diff --git a/src/polygon/src/polygon.cpp b/src/polygon/src/polygon.cpp index a2519c70b..b1961b2c7 100644 --- a/src/polygon/src/polygon.cpp +++ b/src/polygon/src/polygon.cpp @@ -20,7 +20,7 @@ #endif #include #include -#if !__APPLE__ +#if __has_include() #include #endif #include @@ -311,14 +311,7 @@ class Monotones { struct VertAdj; struct EdgePair; enum VertType { Start, WestSide, EastSide, Merge, End, Skip }; -#if __APPLE__ - typedef std::list::iterator VertItr; - typedef std::list::iterator PairItr; - - std::list monotones_; // sweep-line list of verts - std::list activePairs_; // west to east monotone edges - std::list inactivePairs_; // completed monotones -#else +#if __has_include() typedef std::pmr::list::iterator VertItr; typedef std::pmr::list::iterator PairItr; @@ -327,6 +320,13 @@ class Monotones { std::pmr::list monotones_{pa}; // sweep-line list of verts std::pmr::list activePairs_{pa}; // west to east monotone edges std::pmr::list inactivePairs_{pa}; // completed monotones +#else + typedef std::list::iterator VertItr; + typedef std::list::iterator PairItr; + + std::list monotones_; // sweep-line list of verts + std::list activePairs_; // west to east monotone edges + std::list inactivePairs_; // completed monotones #endif float precision_; // a triangle of this height or less is degenerate