Tryfix for Mac build...

This commit is contained in:
tamasmeszaros 2018-07-03 15:15:53 +02:00
parent 16ec625483
commit b4666e8174
2 changed files with 14 additions and 7 deletions

View File

@ -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;

View File

@ -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());