From 69801c4e23f877359118e55ed291737f4fbece04 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 28 Mar 2016 09:45:20 +0200 Subject: Add variable cast from lookup --- build2/file.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'build2/file.cxx') diff --git a/build2/file.cxx b/build2/file.cxx index 30ebed4..9097703 100644 --- a/build2/file.cxx +++ b/build2/file.cxx @@ -660,7 +660,7 @@ namespace build2 if (!l) return; - const dir_path& d (cast (*l)); + const dir_path& d (cast (l)); dir_path out_root (root.out_path () / d); out_root.normalize (); @@ -712,7 +712,7 @@ namespace build2 { if (auto l = root.vars["subprojects"]) { - for (const auto& p: cast (*l)) + for (const auto& p: cast (l)) { dir_path out_root (root.out_path () / p.second); @@ -819,7 +819,7 @@ namespace build2 { // First check the amalgamation itself. // - if (r != &iroot && cast (*r->vars["project"]) == project) + if (r != &iroot && cast (r->vars["project"]) == project) { out_root = r->out_path (); break; @@ -827,7 +827,7 @@ namespace build2 if (auto l = r->vars["subprojects"]) { - const auto& m (cast (*l)); + const auto& m (cast (l)); auto i (m.find (project)); if (i != m.end ()) @@ -851,7 +851,7 @@ namespace build2 if (auto l = iroot[var]) { - out_root = cast (*l); + out_root = cast (l); if (l.belongs (*global_scope)) // A value from command line. { @@ -911,7 +911,7 @@ namespace build2 // if (auto l = root->vars["src_root"]) { - const dir_path& p (cast (*l)); + const dir_path& p (cast (l)); if (!src_root.empty () && p != src_root) fail (loc) << "bootstrapped src_root " << p << " does not match " @@ -928,12 +928,12 @@ namespace build2 // Now we know this project's name as well as all its subprojects. // - if (cast (*root->vars["project"]) == project) + if (cast (root->vars["project"]) == project) break; if (auto l = root->vars["subprojects"]) { - const auto& m (cast (*l)); + const auto& m (cast (l)); auto i (m.find (project)); if (i != m.end ()) -- cgit v1.1