aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/config/utility.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-03-29 10:25:10 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-03-29 10:25:10 +0200
commit441c75f68ca1adfcf833ae778ac150baf16ded2f (patch)
treead7e8aa46c9e389459e0edcc2d5d7861204c5dcc /libbuild2/config/utility.cxx
parentf7ff90672af84a83829371f04f961b389823414c (diff)
Add variable_map::lookup_namespace(string) overload
Diffstat (limited to 'libbuild2/config/utility.cxx')
-rw-r--r--libbuild2/config/utility.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbuild2/config/utility.cxx b/libbuild2/config/utility.cxx
index 928709a..a78b263 100644
--- a/libbuild2/config/utility.cxx
+++ b/libbuild2/config/utility.cxx
@@ -91,7 +91,7 @@ namespace build2
// any original values, they will be "visible"; see find_override() for
// details.
//
- const variable& ns (vp.insert ("config." + n));
+ const string ns ("config." + n);
for (scope* s (&rs); s != nullptr; s = s->parent_scope ())
{
for (auto p (s->vars.lookup_namespace (ns));
@@ -107,12 +107,12 @@ namespace build2
auto match_tail = [&ns, v] (const char* t)
{
- return v->name.compare (ns.name.size () + 1, string::npos, t) == 0;
+ return v->name.compare (ns.size () + 1, string::npos, t) == 0;
};
// Ignore config.*.configured and user-supplied names.
//
- if (v->name.size () <= ns.name.size () ||
+ if (v->name.size () <= ns.size () ||
(!match_tail ("configured") &&
find_if (ig.begin (), ig.end (), match_tail) == ig.end ()))
return true;