aboutsummaryrefslogtreecommitdiff
path: root/build/cxx/module.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-04-15 14:10:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-04-15 14:10:50 +0200
commit6535bf6175af32e2514faf75d2742424751a783b (patch)
tree21312b28ffe2bbb459a57e80a1f8eec498327d9f /build/cxx/module.cxx
parentad720fabd468974e3909f62a0f4e4e3cf0d03aef (diff)
New variables architecture
Now operator[] is only used for lookup.
Diffstat (limited to 'build/cxx/module.cxx')
-rw-r--r--build/cxx/module.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/build/cxx/module.cxx b/build/cxx/module.cxx
index 3c9a4b6..e5c71e7 100644
--- a/build/cxx/module.cxx
+++ b/build/cxx/module.cxx
@@ -49,8 +49,8 @@ namespace build
if (val)
{
- if (val.scope != global_scope)
- break; // A value from config.build.
+ if (!val.belongs (*global_scope))
+ break; // A value from (some) config.build.
v = val.as<const string&> ();
}
@@ -96,7 +96,7 @@ namespace build
// Set on the project root.
//
- root.variables["config.cxx"] = move (v);
+ root.assign ("config.cxx") = move (v);
}
// config.cxx.{p,c,l}options
@@ -113,11 +113,11 @@ namespace build
if (v.defined ())
{
- if (v.scope == global_scope)
- root.variables["config.cxx.poptions"] = v;
+ if (v.belongs (*global_scope))
+ root.assign ("config.cxx.poptions") = v;
}
else
- root.variables["config.cxx.poptions"]; // Set to NULL.
+ root.assign ("config.cxx.poptions") = nullptr;
}
{
@@ -125,11 +125,11 @@ namespace build
if (v.defined ())
{
- if (v.scope == global_scope)
- root.variables["config.cxx.coptions"] = v;
+ if (v.belongs (*global_scope))
+ root.assign ("config.cxx.coptions") = v;
}
else
- root.variables["config.cxx.coptions"]; // Set to NULL.
+ root.assign ("config.cxx.coptions") = nullptr;
}
{
@@ -137,11 +137,11 @@ namespace build
if (v.defined ())
{
- if (v.scope == global_scope)
- root.variables["config.cxx.loptions"] = v;
+ if (v.belongs (*global_scope))
+ root.assign ("config.cxx.loptions") = v;
}
else
- root.variables["config.cxx.loptions"]; // Set to NULL.
+ root.assign ("config.cxx.loptions") = nullptr;
}
{
@@ -149,11 +149,11 @@ namespace build
if (v.defined ())
{
- if (v.scope == global_scope)
- root.variables["config.cxx.libs"] = v;
+ if (v.belongs (*global_scope))
+ root.assign ("config.cxx.libs") = v;
}
else
- root.variables["config.cxx.libs"]; // Set to NULL.
+ root.assign ("config.cxx.libs") = nullptr;
}
}
}