aboutsummaryrefslogtreecommitdiff
path: root/build2/cxx/compile.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-03-28 09:45:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-03-28 16:03:35 +0200
commit69801c4e23f877359118e55ed291737f4fbece04 (patch)
treecd4cb504a5c28aafde601e2d5d4603a44c75b548 /build2/cxx/compile.cxx
parent3ce44330cca9dbc4314feebb27403ebc3175b6c2 (diff)
Add variable cast from lookup
Diffstat (limited to 'build2/cxx/compile.cxx')
-rw-r--r--build2/cxx/compile.cxx16
1 files changed, 8 insertions, 8 deletions
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<string> (*rs["cxx.target.system"]));
+ const string& sys (cast<string> (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<string> (*rs["cxx.checksum"])) != nullptr)
+ if (dd.expect (cast<string> (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<string> (*l) == e)
+ if (cast<string> (l) == e)
return &tt;
return nullptr;
@@ -283,7 +283,7 @@ namespace build2
if (auto l = t[var])
{
- const auto& v (cast<strings> (*l));
+ const auto& v (cast<strings> (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<string> (*rs["config.cxx"]));
- const string& sys (cast<string> (*rs["cxx.target.system"]));
+ const string& cxx (cast<string> (rs["config.cxx"]));
+ const string& sys (cast<string> (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<string> (*rs["config.cxx"]));
- const string& sys (cast<string> (*rs["cxx.target.system"]));
+ const string& cxx (cast<string> (rs["config.cxx"]));
+ const string& sys (cast<string> (rs["cxx.target.system"]));
cstrings args {cxx.c_str ()};