Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortamasmeszaros <meszaros.q@gmail.com>2018-07-03 16:15:53 +0300
committertamasmeszaros <meszaros.q@gmail.com>2018-07-03 17:18:35 +0300
commitb4666e81749befd3eb3e0afc5872f31509be2c37 (patch)
treeb44530b0950765b013679208cf9c27486f129b8c /xs/src/libnest2d
parent16ec625483326c609f264ee4e8086e0a9f38c509 (diff)
Tryfix for Mac build...
Diffstat (limited to 'xs/src/libnest2d')
-rw-r--r--xs/src/libnest2d/libnest2d/clipper_backend/clipper_backend.hpp18
-rw-r--r--xs/src/libnest2d/libnest2d/geometry_traits.hpp3
2 files changed, 14 insertions, 7 deletions
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 <clipper.hpp>
-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 <vector>
#include <numeric>
#include <limits>
+#include <cmath>
#include "common.hpp"
@@ -260,7 +261,7 @@ void setY(RawPoint& p, const TCoord<RawPoint>& val)
template<class RawPoint>
inline Radians _Segment<RawPoint>::angleToXaxis() const
{
- if(std::isnan(angletox_)) {
+ if(std::isnan(static_cast<double>(angletox_))) {
TCoord<RawPoint> dx = getX(second()) - getX(first());
TCoord<RawPoint> dy = getY(second()) - getY(first());