aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/msvc.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-02-07 11:40:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-02-13 12:42:42 +0200
commitdb2a696f810e41189bcdf5524696ff3d0cfbe5a9 (patch)
tree754c198967576ce9c9bdb9b07fdb90ad05b0d8d3 /build2/cc/msvc.cxx
parentbcfcc38538af8bb896551c9e5730767807ad7a67 (diff)
Use target:as<> instead of static_cast for target casting
Diffstat (limited to 'build2/cc/msvc.cxx')
-rw-r--r--build2/cc/msvc.cxx6
1 files changed, 3 insertions, 3 deletions
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<const file&> (*t.member).path ().leaf ());
+ path imp (t.member->as<file> ().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<T&> (p.first));
+ T& t (p.first.template as<T> ());
if (t.path ().empty ())
t.path (move (f));
@@ -340,7 +340,7 @@ namespace build2
true, // Implied.
trace));
assert (!exist || !p.second);
- r = static_cast<libs*> (&p.first);
+ r = &p.first.as<libs> ();
if (r->member == nullptr)
{