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/test/rule.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build2/test/rule.cxx') diff --git a/build2/test/rule.cxx b/build2/test/rule.cxx index 38c24f9..35302e1 100644 --- a/build2/test/rule.cxx +++ b/build2/test/rule.cxx @@ -640,7 +640,7 @@ namespace build2 auto& pts (tt.prerequisite_targets); if (pts.size () != 0 && pts[0] != nullptr) { - const file& it (static_cast (*pts[0])); + const file& it (pts[0]->as ()); assert (!it.path ().empty ()); // Should have been assigned by update. args.push_back (it.path ().string ().c_str ()); } @@ -660,7 +660,7 @@ namespace build2 process_path dpp; if (pts.size () != 0 && pts[1] != nullptr) { - const file& ot (static_cast (*pts[1])); + const file& ot (pts[1]->as ()); assert (!ot.path ().empty ()); // Should have been assigned by update. dpp = run_search (dp, true); -- cgit v1.1