diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2025-03-30 14:23:26 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2025-03-30 14:38:01 +0200 |
commit | 0022a217643dd7119df5dc0fcca41161d3201acc (patch) | |
tree | 8917a1f72958c4c595df4e72ca26389f9780b6c6 /src/rebuild.h | |
parent | 0778d3c45d1aef18d9b2ae6769e372b2a3d83b8e (diff) |
Refactor code for registering build_configuration registrations.
Diffstat (limited to 'src/rebuild.h')
-rw-r--r-- | src/rebuild.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/rebuild.h b/src/rebuild.h index efa6d42..8e0c78a 100644 --- a/src/rebuild.h +++ b/src/rebuild.h @@ -5,26 +5,26 @@ #include <vector> #include <array> +#include <string> +#include <functional> #include "ctor.h" struct BuildConfigurationEntry { - const char* file; - ctor::build_configurations (*cb)(const ctor::settings&); + std::string file; + std::function<ctor::build_configurations (const ctor::settings&)> cb; }; +std::vector<BuildConfigurationEntry>& getConfigFileList(); + struct ExternalConfigurationEntry { - const char* file; - ctor::external_configurations (*cb)(const ctor::settings&); + std::string file; + std::function<ctor::external_configurations (const ctor::settings&)> cb; }; -extern std::array<BuildConfigurationEntry, 1024> configFiles; -extern std::size_t numConfigFiles; - -extern std::array<ExternalConfigurationEntry, 1024> externalConfigFiles; -extern std::size_t numExternalConfigFiles; +std::vector<ExternalConfigurationEntry>& getExternalConfigFileList(); int reg(const char* location); int unreg(const char* location); |