diff --git a/src/vector/vimageloader.cpp b/src/vector/vimageloader.cpp index 2462d972fa..b91554b31c 100644 --- a/src/vector/vimageloader.cpp +++ b/src/vector/vimageloader.cpp @@ -1,7 +1,7 @@ #include "vimageloader.h" #include "config.h" #include "vdebug.h" -#ifndef WIN32 +#ifndef _WIN32 #include #else #include @@ -36,7 +36,7 @@ struct VImageLoader::Impl { lottie_image_load_data_f imageFromData{nullptr}; #if LOTTIE_IMAGE_MODULE_SUPPORT -#ifdef WIN32 +#ifdef _WIN32 HMODULE dl_handle{nullptr}; bool moduleLoad() { diff --git a/src/vector/vline.h b/src/vector/vline.h index f466e31772..f80d3215ac 100644 --- a/src/vector/vline.h +++ b/src/vector/vline.h @@ -51,10 +51,11 @@ private: inline float VLine::angle() const { + static constexpr float K_PI = 3.141592f; const float dx = mX2 - mX1; const float dy = mY2 - mY1; - const float theta = std::atan2(dy, dx) * 180.0 / M_PI; + const float theta = std::atan2f(dy, dx) * 180.0f / K_PI; return theta; } diff --git a/src/vector/vpath.cpp b/src/vector/vpath.cpp index a82cbdf2cd..220b05e94d 100644 --- a/src/vector/vpath.cpp +++ b/src/vector/vpath.cpp @@ -144,7 +144,7 @@ void VPath::VPathData::reserve(size_t pts, size_t elms) static VPointF curvesForArc(const VRectF &, float, float, VPointF *, size_t *); static constexpr float PATH_KAPPA = 0.5522847498f; -static constexpr float K_PI = float(M_PI); +static constexpr float K_PI = 3.141592f; void VPath::VPathData::arcTo(const VRectF &rect, float startAngle, float sweepLength, bool forceMoveTo)