From e99a4acbcd2f7ec8e5cefbf996af1dfa95e61a27 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Wed, 26 Oct 2022 15:08:09 +0400 Subject: cmGlobalGeneratorFactory.h: Simplify returning default values --- Source/cmGlobalGeneratorFactory.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Source/cmGlobalGeneratorFactory.h b/Source/cmGlobalGeneratorFactory.h index d6ababb..e8ed3e0 100644 --- a/Source/cmGlobalGeneratorFactory.h +++ b/Source/cmGlobalGeneratorFactory.h @@ -47,7 +47,7 @@ public: virtual std::string GetDefaultPlatformName() const = 0; }; -template +template class cmGlobalGeneratorSimpleFactory : public cmGlobalGeneratorFactory { public: @@ -70,13 +70,11 @@ public: /** Get the names of the current registered generators */ std::vector GetGeneratorNames() const override { - std::vector names; - names.push_back(T::GetActualName()); - return names; + return { T::GetActualName() }; } std::vector GetGeneratorNamesWithPlatform() const override { - return std::vector(); + return {}; } /** Determine whether or not this generator supports toolsets */ @@ -89,8 +87,8 @@ public: std::vector GetKnownPlatforms() const override { // default is no platform supported - return std::vector(); + return {}; } - std::string GetDefaultPlatformName() const override { return std::string(); } + std::string GetDefaultPlatformName() const override { return {}; } }; -- cgit v0.12