From 6af7742c35ecdf2831908443ca0e04bf23317a96 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 11 Jan 2023 19:57:00 +0100 Subject: Rename Configuation struct to configuration and make get/has functions member functions. --- src/ctor.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ctor.h') diff --git a/src/ctor.h b/src/ctor.h index c9d7d8a..d4a71bd 100644 --- a/src/ctor.h +++ b/src/ctor.h @@ -141,8 +141,11 @@ constexpr auto ctor_includedir = "ctor-includedir"; constexpr auto ctor_libdir = "ctor-libdir"; } -struct Configuration +struct configuration { + bool has(const std::string& key) const; + const std::string& get(const std::string& key, const std::string& default_value = {}) const; + std::vector args; // vector of arguments used when last calling configure std::map env; // env used when last calling configure @@ -150,9 +153,6 @@ struct Configuration std::map externals; }; -const Configuration& configuration(); -bool hasConfiguration(const std::string& key); -const std::string& getConfiguration(const std::string& key, - const std::string& defaultValue = {}); +const ctor::configuration& get_configuration(); } // namespace ctor:: -- cgit v1.2.3