From 4e665067ff264c55086fdfb776a95b0fbb4d432c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 12 Feb 2016 16:10:48 +0200 Subject: / scheme cleanup --- build2/config/module.cxx | 2 +- build2/config/operation | 3 +++ build2/config/utility | 24 +++++++++++------------- build2/config/utility.txx | 6 +++--- 4 files changed, 18 insertions(+), 17 deletions(-) (limited to 'build2/config') diff --git a/build2/config/module.cxx b/build2/config/module.cxx index d3fb45b..11b7aa1 100644 --- a/build2/config/module.cxx +++ b/build2/config/module.cxx @@ -54,7 +54,7 @@ namespace build2 config_init (scope& root, scope&, const location& l, - std::unique_ptr&, + unique_ptr&, bool first, bool) { diff --git a/build2/config/operation b/build2/config/operation index 0a89694..ad010df 100644 --- a/build2/config/operation +++ b/build2/config/operation @@ -5,6 +5,9 @@ #ifndef BUILD2_CONFIG_OPERATION #define BUILD2_CONFIG_OPERATION +#include +#include + #include namespace build2 diff --git a/build2/config/utility b/build2/config/utility index 95ec258..2f53521 100644 --- a/build2/config/utility +++ b/build2/config/utility @@ -5,11 +5,9 @@ #ifndef BUILD2_CONFIG_UTILITY #define BUILD2_CONFIG_UTILITY -#include -#include // pair -#include // reference_wrapper - #include +#include + #include #include @@ -29,29 +27,29 @@ namespace build2 // whether the variable has actually been set. // template - std::pair, bool> + pair, bool> required (scope& root, const variable&, const T& default_value, bool override = false); template - inline std::pair, bool> + inline pair, bool> required (scope& root, - const std::string& name, + const string& name, const T& default_value, bool override = false) { return required (root, var_pool.find (name), default_value, override); } - inline std::pair, bool> + inline pair, bool> required (scope& root, - const std::string& name, + const string& name, const char* default_value, bool override = false) { - return required (root, name, std::string (default_value), override); + return required (root, name, string (default_value), override); } // Set, if necessary, an optional config.* variable. In particular, @@ -65,7 +63,7 @@ namespace build2 optional (scope& root, const variable&); inline const value& - optional (scope& root, const std::string& var) + optional (scope& root, const string& var) { return optional (root, var_pool.find (var)); } @@ -78,7 +76,7 @@ namespace build2 optional_absolute (scope& root, const variable&); inline const value& - optional_absolute (scope& root, const std::string& var) + optional_absolute (scope& root, const string& var) { return optional_absolute (root, var_pool.find (var)); } @@ -95,7 +93,7 @@ namespace build2 // "remember" that it is unconfigured. // bool - specified (scope& root, const std::string& ns); + specified (scope& root, const string& ns); // @@ Why are these here? // diff --git a/build2/config/utility.txx b/build2/config/utility.txx index 3fc40c0..fd32599 100644 --- a/build2/config/utility.txx +++ b/build2/config/utility.txx @@ -9,10 +9,10 @@ namespace build2 namespace config { template - std::pair, bool> + pair, bool> required (scope& root, const variable& var, const T& def_value, bool ovr) { - using result = std::pair, bool>; + using result = pair, bool>; if (auto l = root[var]) { @@ -32,7 +32,7 @@ namespace build2 { if (auto l = s[var]) { - for (const std::string& s: as (*l)) + for (const string& s: as (*l)) { if (s == option) return true; -- cgit v1.1