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/common.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build2/cc/common.cxx') diff --git a/build2/cc/common.cxx b/build2/cc/common.cxx index 654ff53..7b8499c 100644 --- a/build2/cc/common.cxx +++ b/build2/cc/common.cxx @@ -439,7 +439,7 @@ namespace build2 if (const lib* l = xt->is_a ()) xt = &link_member (*l, lo); // Pick liba{} or libs{}. - return static_cast (*xt); + return xt->as (); } // Note that pk's scope should not be NULL (even if dir is absolute). If @@ -563,7 +563,7 @@ namespace build2 trace)); assert (!exist || !p.second); - r = static_cast (&p.first); + r = &p.first.template as (); }; auto search =[&a, &s, -- cgit v1.1