From 0d5234f4aefd3cc5b5948cc1b9dd009e50046f5e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 17 Aug 2015 11:18:10 +0200 Subject: Tighten variable_map interface --- build/scope.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'build/scope.cxx') diff --git a/build/scope.cxx b/build/scope.cxx index 600c46e..d878726 100644 --- a/build/scope.cxx +++ b/build/scope.cxx @@ -17,13 +17,11 @@ namespace build { for (const scope* s (this); s != nullptr; s = s->parent_scope ()) { - auto i (s->vars.find (var)); - if (i != s->vars.end ()) - // @@ Same issue as in variable_map: need ro_value_proxy. - return value_proxy (&const_cast (i->second), &s->vars); + if (const value_ptr* v = s->vars.find (var)) + return value_proxy (v, &s->vars); } - return value_proxy (nullptr, nullptr); + return value_proxy (); } value_proxy scope:: -- cgit v1.1