mirror of
https://github.com/boostorg/graph.git
synced 2026-02-01 08:32:11 +00:00
Don't copy value if not needed, as source's m_property will be set to null when copied.
See https://svn.boost.org/trac10/ticket/13544.
This commit is contained in:
@@ -2058,13 +2058,17 @@ namespace boost {
|
||||
{
|
||||
typename EdgeList::iterator ei = el.begin(), e_end = el.end();
|
||||
while (ei != e_end) {
|
||||
typename EdgeList::value_type ce = *ei;
|
||||
++ei;
|
||||
if (ce.get_target() > u) {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user