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/cc/compile.cxx | |
parent | bcfcc38538af8bb896551c9e5730767807ad7a67 (diff) |
Use target:as<> instead of static_cast for target casting
Diffstat (limited to 'build2/cc/compile.cxx')
-rw-r--r-- | build2/cc/compile.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx index 98d1218..5090f11 100644 --- a/build2/cc/compile.cxx +++ b/build2/cc/compile.cxx @@ -115,7 +115,7 @@ namespace build2 continue; process_libraries (bs, lo, sys_lib_dirs, - static_cast<const file&> (*pt), a, + pt->as<file> (), a, nullptr, nullptr, optf); } } @@ -155,7 +155,7 @@ namespace build2 continue; process_libraries (bs, lo, sys_lib_dirs, - static_cast<const file&> (*pt), a, + pt->as<file> (), a, nullptr, nullptr, optf); } } @@ -198,7 +198,7 @@ namespace build2 continue; process_libraries (bs, lo, sys_lib_dirs, - static_cast<const file&> (*pt), a, + pt->as<file> (), a, nullptr, nullptr, optf); } } @@ -208,7 +208,7 @@ namespace build2 { tracer trace (x, "compile::apply"); - file& t (static_cast<file&> (xt)); + file& t (xt.as<file> ()); const match_data& md (t.data<match_data> ()); const scope& bs (t.base_scope ()); @@ -1405,7 +1405,7 @@ namespace build2 target_state compile:: perform_update (action a, const target& xt) const { - const file& t (static_cast<const file&> (xt)); + const file& t (xt.as<file> ()); // Update prerequisites and determine if any relevant ones render us // out-of-date. Note that currently we treat all the prerequisites @@ -1632,7 +1632,7 @@ namespace build2 target_state compile:: perform_clean (action a, const target& xt) const { - const file& t (static_cast<const file&> (xt)); + const file& t (xt.as<file> ()); if (cid == "msvc") return clean_extra (a, t, {".d", ".idb", ".pdb"}); |