aboutsummaryrefslogtreecommitdiff
path: root/build2/bin
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/bin
parentbcfcc38538af8bb896551c9e5730767807ad7a67 (diff)
Use target:as<> instead of static_cast for target casting
Diffstat (limited to 'build2/bin')
-rw-r--r--build2/bin/rule.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/build2/bin/rule.cxx b/build2/bin/rule.cxx
index a73ad3d..9adb692 100644
--- a/build2/bin/rule.cxx
+++ b/build2/bin/rule.cxx
@@ -48,7 +48,7 @@ namespace build2
match_result lib_rule::
match (slock& ml, action act, target& xt, const string&) const
{
- lib& t (static_cast<lib&> (xt));
+ lib& t (xt.as<lib> ());
// @@ We have to re-query it on each match_only()!
@@ -104,7 +104,7 @@ namespace build2
recipe lib_rule::
apply (slock& ml, action act, target& xt) const
{
- lib& t (static_cast<lib&> (xt));
+ lib& t (xt.as<lib> ());
const match_data& md (t.data<match_data> ());
const string& type (md.type);
@@ -126,7 +126,7 @@ namespace build2
target_state lib_rule::
perform (action act, const target& xt)
{
- const lib& t (static_cast<const lib&> (xt));
+ const lib& t (xt.as<lib> ());
const match_data& md (t.data<match_data> ());
const string& type (md.type);