diff options
-rw-r--r-- | build/scope | 8 | ||||
-rw-r--r-- | build/scope.cxx | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/build/scope b/build/scope index 6051534..7dec7a2 100644 --- a/build/scope +++ b/build/scope @@ -21,7 +21,7 @@ namespace build { public: const dir_path& - path () const {return i_->first;} // Absolute and normalized. + path () const {return *path_;} // Absolute and normalized. const dir_path& src_path () const {return *src_path_;} // Corresponding src path. @@ -112,11 +112,9 @@ namespace build friend class scope_map; friend class temp_scope; - typedef dir_path_map<scope>::const_iterator iterator; - scope () = default; - iterator i_; + const dir_path* path_; // Pointer to the key in scope_map. scope* parent_; scope* root_; }; @@ -132,7 +130,7 @@ namespace build class temp_scope: public scope { public: - temp_scope (scope& p) {i_ = p.i_; parent_ = &p; root_ = p.root_;} + temp_scope (scope& p) {path_ = p.path_; parent_ = &p; root_ = p.root_;} }; class scope_map: public dir_path_map<scope> diff --git a/build/scope.cxx b/build/scope.cxx index 0495011..2b24702 100644 --- a/build/scope.cxx +++ b/build/scope.cxx @@ -88,7 +88,7 @@ namespace build p = &find (k.directory ()); } - s.i_ = er.first; + s.path_ = &er.first->first; s.parent_ = p; s.root_ = root ? &s : (p != nullptr ? p->root_ : nullptr); } |