summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2023-01-11 19:26:26 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2023-01-11 19:26:26 +0100
commit648c89e879f739f82ed6dba7df7243e54b98601f (patch)
tree626756d852fdff35235e1814a63c3daa29403ea3
parentf10bfc1bff1dc2792b4905c27dd22c0999162fac (diff)
Rename ExternalX structs to external_x
-rw-r--r--src/configure.cc8
-rw-r--r--src/ctor.h10
-rw-r--r--src/externals_manual.cc4
-rw-r--r--src/externals_manual.h8
-rw-r--r--src/rebuild.cc2
-rw-r--r--src/rebuild.h2
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<decltype(arg)>;
- if constexpr (std::is_same_v<T, ExternalManual>)
+ if constexpr (std::is_same_v<T, ctor::external_manual>)
{
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<ExternalManual>(ext.external))
+ if(std::holds_alternative<ctor::external_manual>(ext.external))
{
if(auto ret = resolv(settings, ext,
- std::get<ExternalManual>(ext.external),
+ std::get<ctor::external_manual>(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<ExternalManual> external;
+ std::variant<ctor::external_manual> external;
};
-using ExternalConfigurations = std::vector<ExternalConfiguration>;
+using external_configurations = std::vector<ctor::external_configuration>;
-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<std::string, std::string> external_includedir;
extern std::map<std::string, std::string> 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<ExternalConfigurationEntry, 1024> 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<BuildConfigurationEntry, 1024> configFiles;