aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/config
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-03-16 08:57:29 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-03-17 07:47:17 +0200
commit962f83b1e551cc683f1052d32cb79b969e65af5f (patch)
tree8e3d1936db8be9b07baffac289bb3b4e06010cf8 /libbuild2/config
parent9f71deeeb0f8e6fe2c29f209fc96f466fc2831b6 (diff)
Rename all find*(variable) to lookup*(variable)
Now we consistently use term "lookup" for variable value lookup. At some point we should also rename type lookup to binding and get rid of all the lookup_type aliases.
Diffstat (limited to 'libbuild2/config')
-rw-r--r--libbuild2/config/operation.cxx8
-rw-r--r--libbuild2/config/utility.cxx6
-rw-r--r--libbuild2/config/utility.txx4
3 files changed, 9 insertions, 9 deletions
diff --git a/libbuild2/config/operation.cxx b/libbuild2/config/operation.cxx
index 58f6aae..37ff1a3 100644
--- a/libbuild2/config/operation.cxx
+++ b/libbuild2/config/operation.cxx
@@ -218,7 +218,7 @@ namespace build2
//
auto& vp (ctx.var_pool);
- for (auto p (rs.vars.find_namespace (*vp.find ("config")));
+ for (auto p (rs.vars.lookup_namespace (*vp.find ("config")));
p.first != p.second;
++p.first)
{
@@ -260,7 +260,7 @@ namespace build2
{
lookup l {v, *var, rs.vars};
pair<lookup, size_t> org {l, 1 /* depth */};
- pair<lookup, size_t> ovr (rs.find_override (*var, org));
+ pair<lookup, size_t> ovr (rs.lookup_override (*var, org));
if (org.first != ovr.first)
continue;
@@ -295,10 +295,10 @@ namespace build2
{
const variable& var (sv.var);
- pair<lookup, size_t> org (rs.find_original (var));
+ pair<lookup, size_t> org (rs.lookup_original (var));
pair<lookup, size_t> ovr (var.overrides == nullptr
? org
- : rs.find_override (var, org));
+ : rs.lookup_override (var, org));
const lookup& l (ovr.first);
// We definitely write values that are set on our root scope or
diff --git a/libbuild2/config/utility.cxx b/libbuild2/config/utility.cxx
index 8ad150e..7415085 100644
--- a/libbuild2/config/utility.cxx
+++ b/libbuild2/config/utility.cxx
@@ -21,7 +21,7 @@ namespace build2
{
// This is a stripped-down version of the default value case.
- pair<lookup, size_t> org (rs.find_original (var));
+ pair<lookup, size_t> org (rs.lookup_original (var));
bool n (false); // New flag.
lookup l (org.first);
@@ -33,7 +33,7 @@ namespace build2
if (var.overrides != nullptr)
{
- pair<lookup, size_t> ovr (rs.find_override (var, move (org)));
+ pair<lookup, size_t> ovr (rs.lookup_override (var, move (org)));
if (l != ovr.first) // Overriden?
{
@@ -64,7 +64,7 @@ namespace build2
const variable& vns (rs.var_pool ().insert ("config." + n));
for (scope* s (&rs); s != nullptr; s = s->parent_scope ())
{
- for (auto p (s->vars.find_namespace (vns));
+ for (auto p (s->vars.lookup_namespace (vns));
p.first != p.second;
++p.first)
{
diff --git a/libbuild2/config/utility.txx b/libbuild2/config/utility.txx
index ae40ba7..b88f76c 100644
--- a/libbuild2/config/utility.txx
+++ b/libbuild2/config/utility.txx
@@ -18,7 +18,7 @@ namespace build2
save_variable (rs, var, sflags);
- pair<lookup, size_t> org (rs.find_original (var));
+ pair<lookup, size_t> org (rs.lookup_original (var));
bool n (false); // New flag.
lookup l (org.first);
@@ -71,7 +71,7 @@ namespace build2
if (var.overrides != nullptr)
{
- pair<lookup, size_t> ovr (rs.find_override (var, move (org)));
+ pair<lookup, size_t> ovr (rs.lookup_override (var, move (org)));
if (l != ovr.first) // Overriden?
{