aboutsummaryrefslogtreecommitdiff
path: root/build2/context.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-12-15 16:37:14 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-12-15 16:37:14 +0200
commitb3df2f69ff340e2c5c6d215bea6689594f0a3d80 (patch)
treed0919c7ccc4d8600db3d2aa4f5b70694de60b26c /build2/context.cxx
parent9fd23bc8f8c8519e6810262cd96c9a5270d66784 (diff)
Remove unnecessary according to Clang lambda captures to suppress warnings
Apparently, use of a reference to a global variable need not be captured: https://bugs.llvm.org/show_bug.cgi?id=35669
Diffstat (limited to 'build2/context.cxx')
-rw-r--r--build2/context.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/build2/context.cxx b/build2/context.cxx
index c4688be..cfd925b 100644
--- a/build2/context.cxx
+++ b/build2/context.cxx
@@ -399,9 +399,9 @@ namespace build2
// Create global scope. Note that the empty path is a prefix for any other
// path. See the comment in <libbutl/prefix-map.mxx> for details.
//
- auto make_global_scope = [&sm] () -> scope&
+ auto make_global_scope = [] () -> scope&
{
- auto i (sm.insert (dir_path (), false));
+ auto i (scope_map::instance.insert (dir_path (), false));
scope& r (i->second);
r.out_path_ = &i->first;
global_scope = scope::global_ = &r;
@@ -438,10 +438,10 @@ namespace build2
{
const standard_version& v (build_version);
- auto set = [&vp, &gs] (const char* var, auto val)
+ auto set = [&gs] (const char* var, auto val)
{
using T = decltype (val);
- gs.assign (vp.insert<T> (var)) = move (val);
+ gs.assign (variable_pool::instance.insert<T> (var)) = move (val);
};
set ("build.version", v.string_project ());