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/cc/compile.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'build2/cc/compile.cxx') diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx index 23499ad..f837765 100644 --- a/build2/cc/compile.cxx +++ b/build2/cc/compile.cxx @@ -415,12 +415,11 @@ namespace build2 // only use the target type and name from the target key so we can // pass bogus values for the rest. // - const string* dummy (nullptr); - target_key tk {&tt, nullptr, nullptr, &n, dummy}; + target_key tk {&tt, nullptr, nullptr, &n, target_key::nullext}; // This is like prerequisite search. // - if (const string* de = tt.extension (tk, s, true)) + if (optional de = tt.extension (tk, s, true)) if (*de == e) return true; @@ -913,7 +912,7 @@ namespace build2 // dir_path d (f.directory ()); string n (f.leaf ().base ().string ()); - const string* e (&extension_pool.find (f.extension ())); + string e (f.extension ()); // Determine the target type. // @@ -935,7 +934,7 @@ namespace build2 scope& bs (scopes.find (d)); if (scope* rs = bs.root_scope ()) { - tt = map_extension (bs, n, *e); + tt = map_extension (bs, n, e); if (bs.out_path () != bs.src_path () && d.sub (bs.src_path ())) out = out_src (d, *rs); -- cgit v1.1