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/cxx/compile.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'build2/cxx/compile.cxx') diff --git a/build2/cxx/compile.cxx b/build2/cxx/compile.cxx index a2b00de..cf0c91c 100644 --- a/build2/cxx/compile.cxx +++ b/build2/cxx/compile.cxx @@ -130,7 +130,7 @@ namespace build2 // if (a == perform_update_id) { - const string& sys (cast (*rs["cxx.target.system"])); + const string& sys (cast (rs["cxx.target.system"])); // The cached prerequisite target should be the same as what is in // t.prerequisite_targets since we used standard search() and match() @@ -165,7 +165,7 @@ namespace build2 // Then the compiler checksum. // - if (dd.expect (cast (*rs["cxx.checksum"])) != nullptr) + if (dd.expect (cast (rs["cxx.checksum"])) != nullptr) l4 ([&]{trace << "compiler mismatch forcing update of " << t;}); // Then the options checksum. @@ -237,7 +237,7 @@ namespace build2 -> const target_type* { if (auto l = s.lookup (tt, n, var)) - if (cast (*l) == e) + if (cast (l) == e) return &tt; return nullptr; @@ -283,7 +283,7 @@ namespace build2 if (auto l = t[var]) { - const auto& v (cast (*l)); + const auto& v (cast (l)); for (auto i (v.begin ()), e (v.end ()); i != e; ++i) { @@ -461,8 +461,8 @@ namespace build2 auto init_args = [&t, &s, &rs, &args, &cxx_std] () { - const string& cxx (cast (*rs["config.cxx"])); - const string& sys (cast (*rs["cxx.target.system"])); + const string& cxx (cast (rs["config.cxx"])); + const string& sys (cast (rs["cxx.target.system"])); args.push_back (cxx.c_str ()); @@ -923,8 +923,8 @@ namespace build2 path rels (relative (s->path ())); scope& rs (t.root_scope ()); - const string& cxx (cast (*rs["config.cxx"])); - const string& sys (cast (*rs["cxx.target.system"])); + const string& cxx (cast (rs["config.cxx"])); + const string& sys (cast (rs["cxx.target.system"])); cstrings args {cxx.c_str ()}; -- cgit v1.1