diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-07 11:40:07 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-13 12:42:42 +0200 |
commit | db2a696f810e41189bcdf5524696ff3d0cfbe5a9 (patch) | |
tree | 754c198967576ce9c9bdb9b07fdb90ad05b0d8d3 /build2/cc/common.cxx | |
parent | bcfcc38538af8bb896551c9e5730767807ad7a67 (diff) |
Use target:as<> instead of static_cast for target casting
Diffstat (limited to 'build2/cc/common.cxx')
-rw-r--r-- | build2/cc/common.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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<lib> ()) xt = &link_member (*l, lo); // Pick liba{} or libs{}. - return static_cast<const file&> (*xt); + return xt->as<file> (); } // 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<T*> (&p.first); + r = &p.first.template as<T> (); }; auto search =[&a, &s, |