From 648c89e879f739f82ed6dba7df7243e54b98601f Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 11 Jan 2023 19:26:26 +0100 Subject: Rename ExternalX structs to external_x --- src/configure.cc | 8 ++++---- src/ctor.h | 10 +++++----- src/externals_manual.cc | 4 ++-- src/externals_manual.h | 8 ++++---- src/rebuild.cc | 2 +- src/rebuild.h | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/configure.cc b/src/configure.cc index 40f4d27..129fa42 100644 --- a/src/configure.cc +++ b/src/configure.cc @@ -280,7 +280,7 @@ int regenerateCache(ctor::settings& settings, }); // Resolv externals - ExternalConfigurations externalConfigs; + ctor::external_configurations externalConfigs; for(std::size_t i = 0; i < numExternalConfigFiles; ++i) { auto newExternalConfigs = externalConfigFiles[i].cb(settings); @@ -312,7 +312,7 @@ int regenerateCache(ctor::settings& settings, std::visit([&](auto&& arg) { using T = std::decay_t; - if constexpr (std::is_same_v) + if constexpr (std::is_same_v) { add_path_args(ext.name); } @@ -470,10 +470,10 @@ int regenerateCache(ctor::settings& settings, { istr << " { \"" << ext.name << "\", {\n"; ctor::flags resolved_flags; - if(std::holds_alternative(ext.external)) + if(std::holds_alternative(ext.external)) { if(auto ret = resolv(settings, ext, - std::get(ext.external), + std::get(ext.external), resolved_flags)) { return ret; diff --git a/src/ctor.h b/src/ctor.h index c78e92e..c9d7d8a 100644 --- a/src/ctor.h +++ b/src/ctor.h @@ -98,22 +98,22 @@ int reg(ctor::build_configurations (*cb)(const ctor::settings&), const std::source_location location = std::source_location::current()); // This type will use flags verbatim -struct ExternalManual +struct external_manual { ctor::flags flags; }; -struct ExternalConfiguration +struct external_configuration { std::string name; // Name for configuration ctor::output_system system{ctor::output_system::host}; - std::variant external; + std::variant external; }; -using ExternalConfigurations = std::vector; +using external_configurations = std::vector; -int reg(ExternalConfigurations (*cb)(const ctor::settings&), +int reg(ctor::external_configurations (*cb)(const ctor::settings&), const std::source_location location = std::source_location::current()); // Convenience macro - ugly but keeps things simple(r) diff --git a/src/externals_manual.cc b/src/externals_manual.cc index 1fd6b62..84cb422 100644 --- a/src/externals_manual.cc +++ b/src/externals_manual.cc @@ -15,8 +15,8 @@ using namespace ctor; extern std::map external_includedir; extern std::map external_libdir; -int resolv(const ctor::settings& settings, const ExternalConfiguration& config, - const ExternalManual& ext, ctor::flags& flags) +int resolv(const ctor::settings& settings, const ctor::external_configuration& config, + const ctor::external_manual& ext, ctor::flags& flags) { auto tool_chain = getToolChain(config.system); diff --git a/src/externals_manual.h b/src/externals_manual.h index 3d8c452..a906ab7 100644 --- a/src/externals_manual.h +++ b/src/externals_manual.h @@ -5,11 +5,11 @@ namespace ctor { struct settings; -struct ExternalConfiguration; -struct ExternalManual; +struct external_configuration; +struct external_manual; struct flags; } // namespace ctor:: int resolv(const ctor::settings& settings, - const ctor::ExternalConfiguration& name, - const ctor::ExternalManual& ext, ctor::flags& flags); + const ctor::external_configuration& name, + const ctor::external_manual& ext, ctor::flags& flags); diff --git a/src/rebuild.cc b/src/rebuild.cc index c766ae4..7e5259a 100644 --- a/src/rebuild.cc +++ b/src/rebuild.cc @@ -114,7 +114,7 @@ std::array externalConfigFiles; std::size_t numExternalConfigFiles{0}; namespace ctor { -int reg(ExternalConfigurations (*cb)(const ctor::settings&), +int reg(ctor::external_configurations (*cb)(const ctor::settings&), const std::source_location location) { // NOTE: std::cout cannot be used here diff --git a/src/rebuild.h b/src/rebuild.h index c3c3b7a..efa6d42 100644 --- a/src/rebuild.h +++ b/src/rebuild.h @@ -17,7 +17,7 @@ struct BuildConfigurationEntry struct ExternalConfigurationEntry { const char* file; - ctor::ExternalConfigurations (*cb)(const ctor::settings&); + ctor::external_configurations (*cb)(const ctor::settings&); }; extern std::array configFiles; -- cgit v1.2.3