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/cc/compile.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'build2/cc/compile.cxx') 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 (*pt), a, + pt->as (), a, nullptr, nullptr, optf); } } @@ -155,7 +155,7 @@ namespace build2 continue; process_libraries (bs, lo, sys_lib_dirs, - static_cast (*pt), a, + pt->as (), a, nullptr, nullptr, optf); } } @@ -198,7 +198,7 @@ namespace build2 continue; process_libraries (bs, lo, sys_lib_dirs, - static_cast (*pt), a, + pt->as (), a, nullptr, nullptr, optf); } } @@ -208,7 +208,7 @@ namespace build2 { tracer trace (x, "compile::apply"); - file& t (static_cast (xt)); + file& t (xt.as ()); const match_data& md (t.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 (xt)); + const file& t (xt.as ()); // 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 (xt)); + const file& t (xt.as ()); if (cid == "msvc") return clean_extra (a, t, {".d", ".idb", ".pdb"}); -- cgit v1.1