From c7c7983e77e42b5c5209a384fc2afabd5b08974f Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Mon, 3 May 2021 11:50:05 +0200 Subject: [PATCH] Fixing compilation on C++ conforming compilers --- src/clipper/clipper.hpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/clipper/clipper.hpp b/src/clipper/clipper.hpp index 36b9beee5..74e6601f9 100644 --- a/src/clipper/clipper.hpp +++ b/src/clipper/clipper.hpp @@ -192,15 +192,6 @@ inline bool Orientation(const Path &poly) { return Area(poly) >= 0; } int PointInPolygon(const IntPoint &pt, const Path &path); Paths SimplifyPolygon(const Path &in_poly, PolyFillType fillType = pftEvenOdd); -template -inline Paths SimplifyPolygons(PathsProvider &&in_polys, PolyFillType fillType = pftEvenOdd) { - Clipper c; - c.StrictlySimple(true); - c.AddPaths(std::forward(in_polys), ptSubject, true); - Paths out; - c.Execute(ctUnion, out, fillType, fillType); - return out; -} void CleanPolygon(const Path& in_poly, Path& out_poly, double distance = 1.415); void CleanPolygon(Path& poly, double distance = 1.415); @@ -560,6 +551,16 @@ class clipperException : public std::exception }; //------------------------------------------------------------------------------ +template +inline Paths SimplifyPolygons(PathsProvider &&in_polys, PolyFillType fillType = pftEvenOdd) { + Clipper c; + c.StrictlySimple(true); + c.AddPaths(std::forward(in_polys), ptSubject, true); + Paths out; + c.Execute(ctUnion, out, fillType, fillType); + return out; +} + } //ClipperLib namespace #ifdef CLIPPERLIB_NAMESPACE_PREFIX