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/msvc.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'build2/cc/msvc.cxx') diff --git a/build2/cc/msvc.cxx b/build2/cc/msvc.cxx index 86a7d38..94064ca 100644 --- a/build2/cc/msvc.cxx +++ b/build2/cc/msvc.cxx @@ -69,7 +69,7 @@ namespace build2 // if (lt == otype::s && l.compare (0, 3, " ") == 0) { - path imp (static_cast (*t.member).path ().leaf ()); + path imp (t.member->as ().path ().leaf ()); if (l.find (imp.string ()) != string::npos && l.find (imp.base ().string () + ".exp") != string::npos) @@ -276,7 +276,7 @@ namespace build2 true, // Implied. trace)); assert (!exist || !p.second); - T& t (static_cast (p.first)); + T& t (p.first.template as ()); if (t.path ().empty ()) t.path (move (f)); @@ -340,7 +340,7 @@ namespace build2 true, // Implied. trace)); assert (!exist || !p.second); - r = static_cast (&p.first); + r = &p.first.as (); if (r->member == nullptr) { -- cgit v1.1