diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-01-19 16:50:40 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-01-19 16:50:40 +0200 |
commit | 5164c843513212ab1ac1f721c4de04b6a865eb0c (patch) | |
tree | 1c6b2f440bd6dcd41fed60e76095bae2bf4e9e54 /build2/test | |
parent | 5607313a91e5ca0113b1f8b9acfd02c1fb105346 (diff) |
Get rid of extension_pool
Diffstat (limited to 'build2/test')
-rw-r--r-- | build2/test/target.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/build2/test/target.cxx b/build2/test/target.cxx index af3c89b..44f65aa 100644 --- a/build2/test/target.cxx +++ b/build2/test/target.cxx @@ -16,21 +16,21 @@ namespace build2 dir_path d, dir_path o, string n, - const string* e) + optional<string> e) { - if (e == nullptr) - e = &extension_pool.find (n == "testscript" ? "" : "test"); + if (!e) + e = (n == "testscript" ? string () : "test"); - return new testscript (move (d), move (o), move (n), e); + return new testscript (move (d), move (o), move (n), move (e)); } - static const string* + static optional<string> testscript_target_extension (const target_key& tk, scope&, bool) { // If the name is special 'testscript', then there is no extension, // otherwise it is .test. // - return &extension_pool.find (*tk.name == "testscript" ? "" : "test"); + return *tk.name == "testscript" ? string () : "test"; } const target_type testscript::static_type |