diff --git a/BUILD.gn b/BUILD.gn index 7c1e150..3bea5a7 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -51,6 +51,14 @@ if (os_level != "standard") { ] cflags_cc = cflags } + + if (defined(board_toolchain_type) && board_toolchain_type == "clang") { + cflags = [ + "--Wno-float-equal", + ] + cflags_cc = cflags + } + if (enable_graphic_dualcore == true) { defines += [ "HAL_CPU_NUM=2" ] } diff --git a/frameworks/diagram/vertexprimitive/geometry_curves.cpp b/frameworks/diagram/vertexprimitive/geometry_curves.cpp index 6d79d18..3bdde2c 100644 --- a/frameworks/diagram/vertexprimitive/geometry_curves.cpp +++ b/frameworks/diagram/vertexprimitive/geometry_curves.cpp @@ -146,6 +146,9 @@ void QuadrBezierCurveDividOp::Init(float x1, float y1, float x3, float y3) { points_.Clear(); + if (approximationScale_ == 0) { + return; + } distanceToleranceSquare_ = HALFNUM / approximationScale_; distanceToleranceSquare_ *= distanceToleranceSquare_; Bezier(x1, y1, x2, y2, x3, y3);