From 088a60c512aff26eeb026c516d0afe724880cb2b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 7 Apr 2015 10:47:28 +0200 Subject: Provide more convenient access to root scope --- build/algorithm.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'build/algorithm.cxx') 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& 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/. -- cgit v1.1