summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGeneratorFactory.h
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2022-10-26 11:08:09 (GMT)
committerAlex Turbov <i.zaufi@gmail.com>2022-11-17 12:37:13 (GMT)
commite99a4acbcd2f7ec8e5cefbf996af1dfa95e61a27 (patch)
tree150532a2a9c770b3de11efe7f98a1bfbf5f99677 /Source/cmGlobalGeneratorFactory.h
parent7daadd304f87292cd0ec97525d3738ac96377e8a (diff)
downloadCMake-e99a4acbcd2f7ec8e5cefbf996af1dfa95e61a27.zip
CMake-e99a4acbcd2f7ec8e5cefbf996af1dfa95e61a27.tar.gz
CMake-e99a4acbcd2f7ec8e5cefbf996af1dfa95e61a27.tar.bz2
cmGlobalGeneratorFactory.h: Simplify returning default values
Diffstat (limited to 'Source/cmGlobalGeneratorFactory.h')
-rw-r--r--Source/cmGlobalGeneratorFactory.h12
1 files 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 <class T>
+template <typename T>
class cmGlobalGeneratorSimpleFactory : public cmGlobalGeneratorFactory
{
public:
@@ -70,13 +70,11 @@ public:
/** Get the names of the current registered generators */
std::vector<std::string> GetGeneratorNames() const override
{
- std::vector<std::string> names;
- names.push_back(T::GetActualName());
- return names;
+ return { T::GetActualName() };
}
std::vector<std::string> GetGeneratorNamesWithPlatform() const override
{
- return std::vector<std::string>();
+ return {};
}
/** Determine whether or not this generator supports toolsets */
@@ -89,8 +87,8 @@ public:
std::vector<std::string> GetKnownPlatforms() const override
{
// default is no platform supported
- return std::vector<std::string>();
+ return {};
}
- std::string GetDefaultPlatformName() const override { return std::string(); }
+ std::string GetDefaultPlatformName() const override { return {}; }
};