aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/msvc.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-01-19 16:50:40 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-01-19 16:50:40 +0200
commit5164c843513212ab1ac1f721c4de04b6a865eb0c (patch)
tree1c6b2f440bd6dcd41fed60e76095bae2bf4e9e54 /build2/cc/msvc.cxx
parent5607313a91e5ca0113b1f8b9acfd02c1fb105346 (diff)
Get rid of extension_pool
Diffstat (limited to 'build2/cc/msvc.cxx')
-rw-r--r--build2/cc/msvc.cxx13
1 files changed, 6 insertions, 7 deletions
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<string>& 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<lib> () // Only for liba/libs.
- ? extension_pool.find ("lib")
- : *ext);
+ const string& e (!ext || p.is_a<lib> () // Only for liba/libs.
+ ? string ("lib")
+ : *ext);
if (!e.empty ())
{
@@ -268,7 +267,7 @@ namespace build2
{
// Enter the target.
//
- T& t (targets.insert<T> (d, dir_path (), name, &e, trace));
+ T& t (targets.insert<T> (d, dir_path (), name, e, trace));
if (t.path ().empty ())
t.path (move (f));
@@ -323,7 +322,7 @@ namespace build2
msvc_search_library<libi> (x, ld, d, p, otype::s, pf, sf))
{
r = &targets.insert<libs> (
- d, dir_path (), *p.tk.name, nullptr, trace);
+ d, dir_path (), *p.tk.name, nullopt, trace);
if (r->member == nullptr)
{