From 5164c843513212ab1ac1f721c4de04b6a865eb0c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 19 Jan 2017 16:50:40 +0200 Subject: Get rid of extension_pool --- build2/search.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'build2/search.cxx') 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 #include +#include #include #include @@ -76,14 +77,14 @@ namespace build2 // Figure out the extension. Pretty similar logic to file::derive_path(). // - const string* ext (ctk.ext); + optional 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 -- cgit v1.1