From db2a696f810e41189bcdf5524696ff3d0cfbe5a9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 7 Feb 2017 11:40:07 +0200 Subject: Use target:as<> instead of static_cast for target casting --- build2/bin/rule.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'build2/bin') 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 (xt)); + lib& t (xt.as ()); // @@ 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 (xt)); + lib& t (xt.as ()); const match_data& md (t.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 (xt)); + const lib& t (xt.as ()); const match_data& md (t.data ()); const string& type (md.type); -- cgit v1.1