diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-11-11 15:50:44 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-11-11 17:51:28 +0200 |
commit | 45ae0f38febb82a99844df84b65ec0fec31d2918 (patch) | |
tree | 15c1c65b8cb4645720242796c7abaf201eb57e42 /libbuild2/config/module.hxx | |
parent | 07e0d37aba5cd72ff2d53eda654a4d5466e38627 (diff) |
Change default for unused config.import.* variables from drop to keep
Diffstat (limited to 'libbuild2/config/module.hxx')
-rw-r--r-- | libbuild2/config/module.hxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libbuild2/config/module.hxx b/libbuild2/config/module.hxx index 4b9d4f2..296dec5 100644 --- a/libbuild2/config/module.hxx +++ b/libbuild2/config/module.hxx @@ -62,7 +62,7 @@ namespace build2 // std::multimap<std::int32_t, const_iterator> order; - iterator + pair<iterator, bool> insert (string name, int prio = 0) { auto p (emplace (move (name), saved_variables ())); @@ -70,7 +70,7 @@ namespace build2 if (p.second) order.emplace (prio, p.first); - return p.first; + return p; } }; @@ -78,10 +78,12 @@ namespace build2 { config::saved_modules saved_modules; - void + // Return true if variable/module were newly inserted. + // + bool save_variable (const variable&, uint64_t flags = 0); - void + bool save_module (const char* name, int prio = 0); static const string name; |