diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-07 11:40:07 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-13 12:42:42 +0200 |
commit | db2a696f810e41189bcdf5524696ff3d0cfbe5a9 (patch) | |
tree | 754c198967576ce9c9bdb9b07fdb90ad05b0d8d3 /build2/cli/rule.cxx | |
parent | bcfcc38538af8bb896551c9e5730767807ad7a67 (diff) |
Use target:as<> instead of static_cast for target casting
Diffstat (limited to 'build2/cli/rule.cxx')
-rw-r--r-- | build2/cli/rule.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/build2/cli/rule.cxx b/build2/cli/rule.cxx index 5dcec99..7928c5c 100644 --- a/build2/cli/rule.cxx +++ b/build2/cli/rule.cxx @@ -199,7 +199,7 @@ namespace build2 } else { - cli_cxx& g (static_cast<cli_cxx&> (*xt.group)); + cli_cxx& g (xt.group->as<cli_cxx> ()); build2::match (ml, a, g); return group_recipe; // Execute the group's recipe. } @@ -230,7 +230,7 @@ namespace build2 target_state compile:: perform_update (action a, const target& xt) { - const cli_cxx& t (static_cast<const cli_cxx&> (xt)); + const cli_cxx& t (xt.as<cli_cxx> ()); // Update prerequisites and determine if any relevant ones render us // out-of-date. Note that currently we treat all the prerequisites @@ -322,7 +322,7 @@ namespace build2 target_state compile:: perform_clean (action a, const target& xt) { - const cli_cxx& t (static_cast<const cli_cxx&> (xt)); + const cli_cxx& t (xt.as<cli_cxx> ()); // The reverse order of update: first delete the files, then clean // prerequisites. Also update timestamp in case there are operations |