aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/config/utility.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-06-14 06:15:57 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-06-14 06:15:57 +0200
commitcedc661686dad6d82b0a96ea1490d36bc5ffee63 (patch)
tree362614fa115c29ccd42e888ed380251ffd163cf9 /libbuild2/config/utility.cxx
parent38db461e03e949916221f7ae99b06751a3d05cce (diff)
Tighten value::extra usage in config module
Specifically, only values marked with 1 are treated as default leaving other values for use for other purposes.
Diffstat (limited to 'libbuild2/config/utility.cxx')
-rw-r--r--libbuild2/config/utility.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbuild2/config/utility.cxx b/libbuild2/config/utility.cxx
index a64d4d5..2ce94ff 100644
--- a/libbuild2/config/utility.cxx
+++ b/libbuild2/config/utility.cxx
@@ -32,7 +32,7 @@ namespace build2
// Treat an inherited value that was set to default as new.
//
- if (l.defined () && l->extra)
+ if (l.defined () && l->extra == 1)
n = true;
if (var.overrides != nullptr)
@@ -200,7 +200,7 @@ namespace build2
if (org.first != ovr.first)
return make_pair (variable_origin::override_, ovr.first);
- return make_pair (org.first->extra
+ return make_pair (org.first->extra == 1
? variable_origin::default_
: variable_origin::buildfile,
org.first);