From 7253ffee27f6cae34e63a72b2d3d10db10571ecc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 31 Mar 2016 10:59:45 +0200 Subject: Clean up variable lookup interfaces --- build2/variable.cxx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'build2/variable.cxx') 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 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; - // 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 (); } } -- cgit v1.1