From 45ae0f38febb82a99844df84b65ec0fec31d2918 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 11 Nov 2019 15:50:44 +0200 Subject: Change default for unused config.import.* variables from drop to keep --- libbuild2/config/module.hxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libbuild2/config/module.hxx') 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 order; - iterator + pair 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; -- cgit v1.1