diff options
Diffstat (limited to 'boost/geometry/algorithms/detail/overlay/visit_info.hpp')
-rw-r--r-- | boost/geometry/algorithms/detail/overlay/visit_info.hpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/boost/geometry/algorithms/detail/overlay/visit_info.hpp b/boost/geometry/algorithms/detail/overlay/visit_info.hpp index 4284a801a1..9e1e6b9056 100644 --- a/boost/geometry/algorithms/detail/overlay/visit_info.hpp +++ b/boost/geometry/algorithms/detail/overlay/visit_info.hpp @@ -28,11 +28,13 @@ private : int m_visit_code; bool m_rejected; + bool m_final; public: inline visit_info() : m_visit_code(0) , m_rejected(false) + , m_final(false) {} inline void set_visited() { m_visit_code = VISITED; } @@ -49,15 +51,24 @@ public: inline bool started() const { return m_visit_code == STARTED; } inline bool finished() const { return m_visit_code == FINISHED; } inline bool rejected() const { return m_rejected; } + inline bool finalized() const { return m_final; } inline void clear() { - if (! rejected()) + if (! m_rejected && ! m_final) { m_visit_code = NONE; } } + inline void finalize() + { + if (visited() || started() || finished() ) + { + m_final = true; + } + } + #ifdef BOOST_GEOMETRY_DEBUG_INTERSECTION friend std::ostream& operator<<(std::ostream &os, visit_info const& v) { |