forked from conan-io/conan-center-index
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[boost] Apply patch to fix boostorg/graph#268
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/boost/graph/detail/adjacency_list.hpp b/boost/graph/detail/adjacency_list.hpp | ||
index c1a2ada2..806b3f0e 100644 | ||
--- a/boost/graph/detail/adjacency_list.hpp | ||
+++ b/boost/graph/detail/adjacency_list.hpp | ||
@@ -2069,15 +2069,20 @@ namespace detail | ||
inline void reindex_edge_list( | ||
EdgeList& el, vertex_descriptor u, boost::disallow_parallel_edge_tag) | ||
{ | ||
- for (typename EdgeList::iterator ei = el.begin(); ei != el.end(); ++ei) | ||
+ typename EdgeList::iterator ei = el.begin(), e_end = el.end(); | ||
+ while (ei != e_end) { | ||
{ | ||
if (ei->get_target() > u) | ||
{ | ||
typename EdgeList::value_type ce = *ei; | ||
+ ++ei; | ||
el.erase(ce); | ||
--ce.get_target(); | ||
el.insert(ce); | ||
} | ||
+ else { | ||
+ ++ei; | ||
+ } | ||
} | ||
} | ||
} // namespace detail |