2
0
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:
Rasmus Ahlberg
2018-07-30 12:15:25 +02:00
parent 4c752ee2f1
commit e2db737d1b

View File

@@ -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