diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-06-19 15:48:05 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-06-19 15:48:05 +0200 |
commit | d0fb2e203e20f1b3f74b739735865d5ef7d93a2e (patch) | |
tree | 079880d142baf64cf15953efd2cf3b02bc5fd927 | |
parent | 9ae92b4f1d5c24fa9d8d73e6f916b5d6aa01da67 (diff) |
Convenience type for build configuration list.
-rw-r--r-- | cppbuild.cc | 4 | ||||
-rw-r--r-- | libcppbuild.h | 4 | ||||
-rw-r--r-- | subdir/cppbuild.cc | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/cppbuild.cc b/cppbuild.cc index e68ac0b..0524d84 100644 --- a/cppbuild.cc +++ b/cppbuild.cc @@ -49,7 +49,7 @@ Compiler selection per-target (for arm cross-compilation) */ namespace { -std::vector<BuildConfiguration> myConfigs() +BuildConfigurations myConfigs() { return { @@ -98,7 +98,7 @@ std::vector<BuildConfiguration> myConfigs() }; } -std::vector<BuildConfiguration> myConfigs2() +BuildConfigurations myConfigs2() { return { diff --git a/libcppbuild.h b/libcppbuild.h index 1076bb7..a052ac8 100644 --- a/libcppbuild.h +++ b/libcppbuild.h @@ -15,4 +15,6 @@ struct BuildConfiguration std::vector<std::string> ldflags; }; -int reg(const char* location, std::vector<BuildConfiguration> (*cb)()); +using BuildConfigurations = std::vector<BuildConfiguration>; + +int reg(const char* location, BuildConfigurations (*cb)()); diff --git a/subdir/cppbuild.cc b/subdir/cppbuild.cc index 083ccc0..68c16c8 100644 --- a/subdir/cppbuild.cc +++ b/subdir/cppbuild.cc @@ -49,7 +49,7 @@ Compiler selection per-target (for arm cross-compilation) */ namespace { -std::vector<BuildConfiguration> myConfigs() +BuildConfigurations myConfigs() { return { |