$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r69958 - trunk/boost/geometry/algorithms/detail/overlay
From: barend.gehrels_at_[hidden]
Date: 2011-03-13 12:09:51
Author: barendgehrels
Date: 2011-03-13 12:09:47 EDT (Sun, 13 Mar 2011)
New Revision: 69958
URL: http://svn.boost.org/trac/boost/changeset/69958
Log:
Performance fix for get_turns/partition
Text files modified: 
   trunk/boost/geometry/algorithms/detail/overlay/get_turns.hpp |    30 +++++++++++++++++-------------          
   1 files changed, 17 insertions(+), 13 deletions(-)
Modified: trunk/boost/geometry/algorithms/detail/overlay/get_turns.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/get_turns.hpp	(original)
+++ trunk/boost/geometry/algorithms/detail/overlay/get_turns.hpp	2011-03-13 12:09:47 EDT (Sun, 13 Mar 2011)
@@ -367,19 +367,23 @@
     template <typename Section>
     inline bool apply(Section const& sec1, Section const& sec2)
     {
-        return get_turns_in_sections
-                <
-                    Geometry1,
-                    Geometry2,
-                    Reverse1, Reverse2,
-                    Section, Section,
-                    Turns,
-                    TurnPolicy,
-                    InterruptPolicy
-                >::apply(
-                        m_source_id1, m_geometry1, sec1,
-                        m_source_id2, m_geometry2, sec2,
-                        m_turns, m_interrupt_policy);
+        if (! detail::disjoint::disjoint_box_box(sec1.bounding_box, sec2.bounding_box))
+        {
+            return get_turns_in_sections
+                    <
+                        Geometry1,
+                        Geometry2,
+                        Reverse1, Reverse2,
+                        Section, Section,
+                        Turns,
+                        TurnPolicy,
+                        InterruptPolicy
+                    >::apply(
+                            m_source_id1, m_geometry1, sec1,
+                            m_source_id2, m_geometry2, sec2,
+                            m_turns, m_interrupt_policy);
+        }
+        return true;
     }
 
 };