aboutsummaryrefslogtreecommitdiff
path: root/build/scope
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-04-15 11:59:58 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-04-15 11:59:58 +0200
commitad720fabd468974e3909f62a0f4e4e3cf0d03aef (patch)
tree8c6b7d851e42a42118b28488a9a3def8e86cd849 /build/scope
parentace1743f7f78bb13f99553d6e97ad1beecf1ba99 (diff)
Initial library support
Diffstat (limited to 'build/scope')
-rw-r--r--build/scope9
1 files changed, 6 insertions, 3 deletions
diff --git a/build/scope b/build/scope
index f9492e6..e4a8a7d 100644
--- a/build/scope
+++ b/build/scope
@@ -46,10 +46,13 @@ namespace build
//
public:
value_proxy
- operator[] (const std::string&);
+ operator[] (const variable&);
value_proxy
- operator[] (const variable&);
+ operator[] (const std::string& name)
+ {
+ return operator[] (variable_pool.find (name));
+ }
const dir_path* src_path_ {nullptr}; // Cached src_{root,base} var value.
@@ -92,7 +95,7 @@ namespace build
typedef dir_path_map<scope>::const_iterator iterator;
- scope (): variables (*this) {}
+ scope (): variables (this) {}
iterator i_;
scope* parent_;