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/search.cxx | |
parent | 5607313a91e5ca0113b1f8b9acfd02c1fb105346 (diff) |
Get rid of extension_pool
Diffstat (limited to 'build2/search.cxx')
-rw-r--r-- | build2/search.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/build2/search.cxx b/build2/search.cxx index 75d94a0..50318a7 100644 --- a/build2/search.cxx +++ b/build2/search.cxx @@ -8,6 +8,7 @@ #include <build2/scope> #include <build2/target> +#include <build2/context> #include <build2/prerequisite> #include <build2/diagnostics> @@ -76,14 +77,14 @@ namespace build2 // Figure out the extension. Pretty similar logic to file::derive_path(). // - const string* ext (ctk.ext); + optional<string> ext (ctk.ext); - if (ext == nullptr) + if (!ext) { if (auto f = ctk.type->extension) - ext = f (ctk, *cpk.scope, true); // Already from the pool. + ext = f (ctk, *cpk.scope, true); - if (ext == nullptr) + if (!ext) { // What should we do here, fail or say we didn't find anything? // Current think is that if the target type couldn't find the default |