aboutsummaryrefslogtreecommitdiff
path: root/build2/install/rule.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/install/rule.cxx
parent3ce44330cca9dbc4314feebb27403ebc3175b6c2 (diff)
Add variable cast from lookup
Diffstat (limited to 'build2/install/rule.cxx')
-rw-r--r--build2/install/rule.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/build2/install/rule.cxx b/build2/install/rule.cxx
index 89463f8..25259cf 100644
--- a/build2/install/rule.cxx
+++ b/build2/install/rule.cxx
@@ -31,7 +31,7 @@ namespace build2
if (!l)
return nullptr;
- const dir_path& r (cast<dir_path> (*l));
+ const dir_path& r (cast<dir_path> (l));
return r.simple () && r.string () == "false" ? nullptr : &r;
}
@@ -64,7 +64,7 @@ namespace build2
//
auto l (pt["install"]);
- if (l && cast<dir_path> (*l).string () == "false")
+ if (l && cast<dir_path> (l).string () == "false")
{
l5 ([&]{trace << "ignoring " << pt;});
continue;
@@ -148,7 +148,7 @@ namespace build2
// See if the user instructed us not to install it.
//
auto l ((*pt)["install"]);
- if (l && cast<dir_path> (*l).string () == "false")
+ if (l && cast<dir_path> (l).string () == "false")
continue;
build2::match (a, *pt);
@@ -358,11 +358,11 @@ namespace build2
//
if (var != nullptr)
{
- if (auto l = s[*var + ".sudo"]) r.sudo = cast<string> (*l);
- if (auto l = s[*var + ".cmd"]) r.cmd = cast<string> (*l);
- if (auto l = s[*var + ".mode"]) r.mode = cast<string> (*l);
- if (auto l = s[*var + ".dir_mode"]) r.dir_mode = cast<string> (*l);
- if (auto l = s[*var + ".options"]) r.options = cast<strings> (*l);
+ if (auto l = s[*var + ".sudo"]) r.sudo = cast<string> (l);
+ if (auto l = s[*var + ".cmd"]) r.cmd = cast<string> (l);
+ if (auto l = s[*var + ".mode"]) r.mode = cast<string> (l);
+ if (auto l = s[*var + ".dir_mode"]) r.dir_mode = cast<string> (l);
+ if (auto l = s[*var + ".options"]) r.options = cast<strings> (l);
}
// Set defaults for unspecified components.
@@ -403,12 +403,12 @@ namespace build2
//
install_dir d (
resolve (t.base_scope (),
- cast<dir_path> (*t["install"]))); // We know it's there.
+ cast<dir_path> (t["install"]))); // We know it's there.
// Override mode if one was specified.
//
if (auto l = t["install.mode"])
- d.mode = cast<string> (*l);
+ d.mode = cast<string> (l);
install (d, ft);
return (r |= target_state::changed);