aboutsummaryrefslogtreecommitdiff
path: root/build2/file.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/file.cxx
parent3ce44330cca9dbc4314feebb27403ebc3175b6c2 (diff)
Add variable cast from lookup
Diffstat (limited to 'build2/file.cxx')
-rw-r--r--build2/file.cxx16
1 files changed, 8 insertions, 8 deletions
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<dir_path> (*l));
+ const dir_path& d (cast<dir_path> (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<subprojects> (*l))
+ for (const auto& p: cast<subprojects> (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<string> (*r->vars["project"]) == project)
+ if (r != &iroot && cast<string> (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<subprojects> (*l));
+ const auto& m (cast<subprojects> (l));
auto i (m.find (project));
if (i != m.end ())
@@ -851,7 +851,7 @@ namespace build2
if (auto l = iroot[var])
{
- out_root = cast<dir_path> (*l);
+ out_root = cast<dir_path> (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<dir_path> (*l));
+ const dir_path& p (cast<dir_path> (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<string> (*root->vars["project"]) == project)
+ if (cast<string> (root->vars["project"]) == project)
break;
if (auto l = root->vars["subprojects"])
{
- const auto& m (cast<subprojects> (*l));
+ const auto& m (cast<subprojects> (l));
auto i (m.find (project));
if (i != m.end ())