From: Justin Viiret Date: Tue, 21 Mar 2017 23:56:59 +0000 (+1100) Subject: ng_region: no need to copy enters X-Git-Tag: v4.5.0^2~148 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1200f33116ae393d199ea318043951bbceea64b9;p=thirdparty%2Fvectorscan.git ng_region: no need to copy enters --- diff --git a/src/nfagraph/ng_region.cpp b/src/nfagraph/ng_region.cpp index 6fef9aa9..91904b46 100644 --- a/src/nfagraph/ng_region.cpp +++ b/src/nfagraph/ng_region.cpp @@ -194,7 +194,9 @@ void buildInitialCandidate(const AcyclicGraph &g, return; } - auto enters = exits.front().open; // copy + // Note: findExits() will clear exits, so it's safe to mutate/move its + // elements here. + auto &enters = exits.front().open; candidate.clear(); for (; it != ite; ++it) {