From cedc661686dad6d82b0a96ea1490d36bc5ffee63 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 14 Jun 2022 06:15:57 +0200 Subject: 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. --- libbuild2/config/utility.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libbuild2/config/utility.cxx') 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); -- cgit v1.1