diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-17 15:25:00 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-17 15:25:00 +0200 |
commit | 3c0bf7825ce2aaa8f0c5a29757ce61bbbba40b5c (patch) | |
tree | f812fff72fa582e0e8c621fd4ee1f2cba36284ea /build/target.cxx | |
parent | 8f8ab1e8f6d85748547c0d0e9987eed4f3c3e17b (diff) |
Search in target group during variable lookup
Diffstat (limited to 'build/target.cxx')
-rw-r--r-- | build/target.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/build/target.cxx b/build/target.cxx index cb751ad..4f06596 100644 --- a/build/target.cxx +++ b/build/target.cxx @@ -56,10 +56,14 @@ namespace build { auto i (vars.find (var)); - return i != vars.end () + if (i != vars.end ()) // @@ Same issue as in variable_map: need ro_value_proxy. - ? value_proxy (&const_cast<value_ptr&> (i->second), &vars) - : base_scope ()[var]; + return value_proxy (&const_cast<value_ptr&> (i->second), &vars); + + if (group != nullptr) + return (*group)[var]; + + return base_scope ()[var]; } value_proxy target:: |