aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/variable.cxx2
-rw-r--r--build2/variable.hxx5
2 files changed, 5 insertions, 2 deletions
diff --git a/build2/variable.cxx b/build2/variable.cxx
index 8d9aa14..ce88712 100644
--- a/build2/variable.cxx
+++ b/build2/variable.cxx
@@ -1135,7 +1135,7 @@ namespace build2
variable& r (p.first->second);
- if (!p.second)
+ if (!p.second) // Note: overridden variable will always exist.
{
if (t != nullptr || v != nullptr || o != nullptr)
update (r, t, v, o); // Not changing the key.
diff --git a/build2/variable.hxx b/build2/variable.hxx
index 60a1699..c5e1a13 100644
--- a/build2/variable.hxx
+++ b/build2/variable.hxx
@@ -117,6 +117,9 @@ namespace build2
// reset() before any other variables. Project wide overrides are entered in
// main(). Overriding happens in scope::find_override().
//
+ // NULL type and normal visibility are the defaults and can be overridden by
+ // "tighter" values.
+ //
struct variable
{
string name;
@@ -804,7 +807,7 @@ namespace build2
class variable_pool
{
public:
- // Find existing or insert new.
+ // Find existing (assert exists).
//
const variable&
operator[] (const string& name) const;