diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-29 09:19:37 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-29 09:19:37 +0200 |
commit | 97913b6fb268f327ee1a689779cb9b0621f72ff2 (patch) | |
tree | dd130d9a3fc5a7b36bf2243eced97d4f4f7e6620 /build2/config/operation.cxx | |
parent | 150bf0a18baab913c01fd1fa5f431455c35c99e1 (diff) |
Fix duplicate config.build variable issue
Diffstat (limited to 'build2/config/operation.cxx')
-rw-r--r-- | build2/config/operation.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
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<const module> (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, |