From d0fb2e203e20f1b3f74b739735865d5ef7d93a2e Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 19 Jun 2021 15:48:05 +0200 Subject: Convenience type for build configuration list. --- cppbuild.cc | 4 ++-- libcppbuild.h | 4 +++- 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 myConfigs() +BuildConfigurations myConfigs() { return { @@ -98,7 +98,7 @@ std::vector myConfigs() }; } -std::vector 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 ldflags; }; -int reg(const char* location, std::vector (*cb)()); +using BuildConfigurations = std::vector; + +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 myConfigs() +BuildConfigurations myConfigs() { return { -- cgit v1.2.3