diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-07 10:47:28 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-07 10:47:28 +0200 |
commit | 088a60c512aff26eeb026c516d0afe724880cb2b (patch) | |
tree | 3fbd798bd6a385875c8db3b2677a94d3abeb23eb /build/algorithm.cxx | |
parent | 137df0bea6cebabe5278e67e5dad6f3047c762fb (diff) |
Provide more convenient access to root scope
Diffstat (limited to 'build/algorithm.cxx')
-rw-r--r-- | build/algorithm.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/build/algorithm.cxx b/build/algorithm.cxx index 87e2259..3fc2e92 100644 --- a/build/algorithm.cxx +++ b/build/algorithm.cxx @@ -173,11 +173,11 @@ namespace build { tracer trace ("inject_parent_fsdir"); - scope& s (scopes.find (t.dir)); + scope& s (t.base_scope ()); - if (auto v = s["out_root"]) // Could be outside any project. + if (scope* rs = s.root_scope ()) // Could be outside any project. { - const path& out_root (v.as<const path&> ()); + const path& out_root (rs->path ()); // If t is a directory (name is empty), say foo/bar/, then // t is bar and its parent directory is foo/. |