diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-08-18 08:04:07 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-08-18 08:04:07 +0200 |
commit | b2df0b0663d0537dd3b4f2d28d145ccd90417cab (patch) | |
tree | b58ff44bfa5a8423721d6b865541a2e3a3d27d60 /libbuild2/config/module.cxx | |
parent | 5521a0edd9a2ba8429f7d2e48f754c9d6f66cc3b (diff) |
Add ability to mark config.* variables as "unsaved" (always transient)
Diffstat (limited to 'libbuild2/config/module.cxx')
-rw-r--r-- | libbuild2/config/module.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libbuild2/config/module.cxx b/libbuild2/config/module.cxx index 6b0c82a..bf68c4e 100644 --- a/libbuild2/config/module.cxx +++ b/libbuild2/config/module.cxx @@ -12,7 +12,7 @@ namespace build2 namespace config { bool module:: - save_variable (const variable& var, uint64_t flags) + save_variable (const variable& var, optional<uint64_t> flags) { const string& n (var.name); @@ -39,7 +39,7 @@ namespace build2 if (j != sv.end ()) { - assert (j->flags == flags); + assert (!j->flags == !flags && (!flags || *j->flags == *flags)); return false; } @@ -48,7 +48,7 @@ namespace build2 } void module:: - save_variable (scope& rs, const variable& var, uint64_t flags) + save_variable (scope& rs, const variable& var, optional<uint64_t> flags) { if (module* m = rs.find_module<module> (module::name)) m->save_variable (var, flags); |