diff options
Diffstat (limited to 'build2/config/utility.cxx')
-rw-r--r-- | build2/config/utility.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/build2/config/utility.cxx b/build2/config/utility.cxx index dac11c2..7a3fa9c 100644 --- a/build2/config/utility.cxx +++ b/build2/config/utility.cxx @@ -14,7 +14,7 @@ namespace build2 { namespace config { - pair<const value*, bool> + pair<lookup, bool> omitted (scope& r, const variable& var) { // This is a stripped-down version of the required() twisted @@ -44,12 +44,12 @@ namespace build2 } if (l.defined () && current_mif->id == configure_id) - save_variable (r, var); + save_variable (r, var); - return pair<const value*, bool> (l.value, n); + return pair<lookup, bool> (l, n); } - const value& + lookup optional (scope& r, const variable& var) { if (current_mif->id == configure_id) @@ -57,8 +57,8 @@ namespace build2 auto l (r[var]); return l.defined () - ? *l - : r.assign (var); // NULL. + ? l + : lookup (r.assign (var), r); // NULL. } bool |