From d263455d5ac0d87541144dd7a37eb6255b721a89 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 2 Feb 2017 11:55:03 +0200 Subject: Redesign target_set interface in preparation for locking --- build2/operation.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'build2/operation.cxx') diff --git a/build2/operation.cxx b/build2/operation.cxx index 4e65783..5815834 100644 --- a/build2/operation.cxx +++ b/build2/operation.cxx @@ -76,11 +76,10 @@ namespace build2 phase_guard pg (run_phase::search_match); - auto i (targets.find (tk, trace)); - if (i == targets.end ()) + if (target* t = targets.find (tk, trace)) + ts.push_back (t); + else fail (l) << "unknown target " << tk; - - ts.push_back (i->get ()); } void -- cgit v1.1