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/msvc.cxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'build2/cc/msvc.cxx') diff --git a/build2/cc/msvc.cxx b/build2/cc/msvc.cxx index 5ce2f2a..4ac82a0 100644 --- a/build2/cc/msvc.cxx +++ b/build2/cc/msvc.cxx @@ -231,7 +231,7 @@ namespace build2 // tracer trace (mod, "msvc_search_library"); - const string* ext (p.tk.ext); + const optional& ext (p.tk.ext); const string& name (*p.tk.name); // Assemble the file path. @@ -249,10 +249,9 @@ namespace build2 if (*sfx != '\0') f += sfx; - const string& e ( - ext == nullptr || p.is_a () // Only for liba/libs. - ? extension_pool.find ("lib") - : *ext); + const string& e (!ext || p.is_a () // Only for liba/libs. + ? string ("lib") + : *ext); if (!e.empty ()) { @@ -268,7 +267,7 @@ namespace build2 { // Enter the target. // - T& t (targets.insert (d, dir_path (), name, &e, trace)); + T& t (targets.insert (d, dir_path (), name, e, trace)); if (t.path ().empty ()) t.path (move (f)); @@ -323,7 +322,7 @@ namespace build2 msvc_search_library (x, ld, d, p, otype::s, pf, sf)) { r = &targets.insert ( - d, dir_path (), *p.tk.name, nullptr, trace); + d, dir_path (), *p.tk.name, nullopt, trace); if (r->member == nullptr) { -- cgit v1.1