aboutsummaryrefslogtreecommitdiff
path: root/build2/scope.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-04-11 07:57:19 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-04-11 07:57:19 +0200
commit0342dc2fcdd78ef28a4e59d84193a3807068d726 (patch)
treee750c3062d6ff54f0d409fe1a25984b7e78592c8 /build2/scope.cxx
parent5f7c3f923de106f9d204a8f3500274731ae84fd9 (diff)
New configuration logic, iteration 1
Diffstat (limited to 'build2/scope.cxx')
-rw-r--r--build2/scope.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/build2/scope.cxx b/build2/scope.cxx
index 75652a2..19f3b56 100644
--- a/build2/scope.cxx
+++ b/build2/scope.cxx
@@ -27,18 +27,26 @@ namespace build2
++d;
if (f)
- if (auto l = s->target_vars.find (*tt, *tn, var))
+ {
+ lookup l (s->target_vars.find (*tt, *tn, var));
+
+ if (l.defined ())
return make_pair (move (l), d);
+ }
++d;
if (f && gt != nullptr)
- if (auto l = s->target_vars.find (*gt, *gn, var))
+ {
+ lookup l (s->target_vars.find (*gt, *gn, var));
+
+ if (l.defined ())
return make_pair (move (l), d);
+ }
}
++d;
- if (auto r = s->vars.find (var))
- return make_pair (lookup (r, &s->vars), d);
+ if (const value* v = s->vars.find (var))
+ return make_pair (lookup (v, &s->vars), d);
switch (var.visibility)
{