aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-12-03 14:26:11 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-12-03 14:26:11 +0200
commit7a0309b5dd37acb30321716794fba4449b374add (patch)
treeb57603d1d797ecddd07f69420538946239313e96
parent721835d4dd0fe306e4b55d425f9360fac592eace (diff)
Add few clarifying comments
-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;