From b4666e81749befd3eb3e0afc5872f31509be2c37 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Tue, 3 Jul 2018 15:15:53 +0200 Subject: Tryfix for Mac build... --- .../libnest2d/clipper_backend/clipper_backend.hpp | 18 ++++++++++++------ xs/src/libnest2d/libnest2d/geometry_traits.hpp | 3 ++- 2 files changed, 14 insertions(+), 7 deletions(-) (limited to 'xs/src/libnest2d') 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()); -- cgit v1.2.3