diff --git a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp index 3f038faff..8fb458a15 100644 --- a/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp +++ b/xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp @@ -12,12 +12,10 @@ #include -namespace libnest2d { - -// Aliases for convinience -using PointImpl = ClipperLib::IntPoint; -using PolygonImpl = ClipperLib::PolyNode; -using PathImpl = ClipperLib::Path; +namespace ClipperLib { +using PointImpl = IntPoint; +using PolygonImpl = PolyNode; +using PathImpl = Path; inline PointImpl& operator +=(PointImpl& p, const PointImpl& pa ) { // This could be done with SIMD @@ -50,6 +48,14 @@ inline PointImpl operator-(const PointImpl& p1, const PointImpl& p2) { ret -= p2; return ret; } +} + +namespace libnest2d { + +// Aliases for convinience +using PointImpl = ClipperLib::IntPoint; +using PolygonImpl = ClipperLib::PolyNode; +using PathImpl = ClipperLib::Path; //extern HoleCache holeCache; diff --git a/xs/src/libnest2d/libnest2d/geometry_traits.hpp b/xs/src/libnest2d/libnest2d/geometry_traits.hpp index f4cfe31af..758bdd1bd 100644 --- a/xs/src/libnest2d/libnest2d/geometry_traits.hpp +++ b/xs/src/libnest2d/libnest2d/geometry_traits.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include "common.hpp" @@ -260,7 +261,7 @@ void setY(RawPoint& p, const TCoord& val) template inline Radians _Segment::angleToXaxis() const { - if(std::isnan(angletox_)) { + if(std::isnan(static_cast(angletox_))) { TCoord dx = getX(second()) - getX(first()); TCoord dy = getY(second()) - getY(first());