aboutsummaryrefslogtreecommitdiff
path: root/build2/variable.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-03-31 10:59:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-03-31 10:59:45 +0200
commit7253ffee27f6cae34e63a72b2d3d10db10571ecc (patch)
treec86b321ad4d2bcb05eda451ad3cae5ac8429cabf /build2/variable.cxx
parent6417a4e6af2b7732ec0da6af24f1a56f7cdada3f (diff)
Clean up variable lookup interfaces
Diffstat (limited to 'build2/variable.cxx')
-rw-r--r--build2/variable.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/build2/variable.cxx b/build2/variable.cxx
index 4597e9e..0870000 100644
--- a/build2/variable.cxx
+++ b/build2/variable.cxx
@@ -640,18 +640,16 @@ namespace build2
// variable_type_map
//
- lookup<const value> variable_type_map::
- lookup (const target_type& type,
- const string& name,
- const variable& var) const
+ lookup variable_type_map::
+ find (const target_type& type,
+ const string& name,
+ const variable& var) const
{
- using result = build2::lookup<const value>;
-
// Search across target type hierarchy.
//
for (auto tt (&type); tt != nullptr; tt = tt->base)
{
- auto i (find (*tt));
+ auto i (variable_type_map_base::find (*tt));
if (i == end ())
continue;
@@ -698,11 +696,11 @@ namespace build2
//@@ TODO: should we detect ambiguity? 'foo-*' '*-foo' and
// 'foo-foo'? Right now the last defined will be used.
//
- return result (v, &j->second);
+ return lookup (v, &j->second);
}
}
}
- return result ();
+ return lookup ();
}
}