aboutsummaryrefslogtreecommitdiff
path: root/build2/test
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-02-07 11:40:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-02-13 12:42:42 +0200
commitdb2a696f810e41189bcdf5524696ff3d0cfbe5a9 (patch)
tree754c198967576ce9c9bdb9b07fdb90ad05b0d8d3 /build2/test
parentbcfcc38538af8bb896551c9e5730767807ad7a67 (diff)
Use target:as<> instead of static_cast for target casting
Diffstat (limited to 'build2/test')
-rw-r--r--build2/test/rule.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/build2/test/rule.cxx b/build2/test/rule.cxx
index 38c24f9..35302e1 100644
--- a/build2/test/rule.cxx
+++ b/build2/test/rule.cxx
@@ -640,7 +640,7 @@ namespace build2
auto& pts (tt.prerequisite_targets);
if (pts.size () != 0 && pts[0] != nullptr)
{
- const file& it (static_cast<const file&> (*pts[0]));
+ const file& it (pts[0]->as<file> ());
assert (!it.path ().empty ()); // Should have been assigned by update.
args.push_back (it.path ().string ().c_str ());
}
@@ -660,7 +660,7 @@ namespace build2
process_path dpp;
if (pts.size () != 0 && pts[1] != nullptr)
{
- const file& ot (static_cast<const file&> (*pts[1]));
+ const file& ot (pts[1]->as<file> ());
assert (!ot.path ().empty ()); // Should have been assigned by update.
dpp = run_search (dp, true);