From 97913b6fb268f327ee1a689779cb9b0621f72ff2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 29 Jul 2016 09:19:37 +0200 Subject: Fix duplicate config.build variable issue --- build2/config/operation.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'build2/config/operation.cxx') diff --git a/build2/config/operation.cxx b/build2/config/operation.cxx index faeb570..0773f00 100644 --- a/build2/config/operation.cxx +++ b/build2/config/operation.cxx @@ -143,7 +143,7 @@ namespace build2 { if (l.belongs (*r)) { - // Find config module. + // Find the config module. // if (auto* m = r->modules.lookup (module::name)) { @@ -153,15 +153,10 @@ namespace build2 if (i != m->saved_modules.end ()) { - // Find the variable. For now we do linear search. + // Find the variable. // const saved_variables& sv (i->second); - - found = find_if ( - sv.begin (), - sv.end (), - [&var] (const saved_variable& v) { - return var == v.var;}) != sv.end (); + found = sv.find (var) != sv.end (); // Handle that other case: if this is an override but // the outer project itself is not being configured, -- cgit v1.1