diff options
author | Brad King <brad.king@kitware.com> | 2019-09-06 16:37:55 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-09-06 16:38:04 (GMT) |
commit | ca8c3d64c8accebeacf322f0574494ffddb039c5 (patch) | |
tree | 8e5ef52b55ceb4920e7e063cf91b15487915643a /Source/CPack | |
parent | 45e90f62dd422a93b14b5ed9d49d26a51116d4fd (diff) | |
parent | 1d3f5ebb0d3da35d1b5b1287f39115b188ac5f6a (diff) | |
download | CMake-ca8c3d64c8accebeacf322f0574494ffddb039c5.zip CMake-ca8c3d64c8accebeacf322f0574494ffddb039c5.tar.gz CMake-ca8c3d64c8accebeacf322f0574494ffddb039c5.tar.bz2 |
Merge topic 'use-using'
1d3f5ebb0d clang-tidy: Enable check modernize-use-using
a1ddf2d0ba clang-tidy: Replace typedef with using
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3782
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWGenerator.h | 12 | ||||
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWInstaller.h | 4 | ||||
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWRepository.h | 2 | ||||
-rw-r--r-- | Source/CPack/WiX/cmCPackWIXGenerator.h | 6 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXPatchParser.h | 6 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx | 2 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXShortcut.h | 6 | ||||
-rw-r--r-- | Source/CPack/cmCPackArchiveGenerator.h | 2 | ||||
-rw-r--r-- | Source/CPack/cmCPackGenerator.h | 2 | ||||
-rw-r--r-- | Source/CPack/cmCPackGeneratorFactory.h | 6 | ||||
-rw-r--r-- | Source/CPack/cpack.cxx | 2 |
11 files changed, 25 insertions, 25 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h index 0430122..ee3c166 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.h +++ b/Source/CPack/IFW/cmCPackIFWGenerator.h @@ -29,12 +29,12 @@ class cmCPackIFWGenerator public: cmCPackTypeMacro(cmCPackIFWGenerator, cmCPackGenerator); - typedef std::map<std::string, cmCPackIFWPackage> PackagesMap; - typedef std::map<std::string, cmCPackIFWRepository> RepositoriesMap; - typedef std::map<std::string, cmCPackComponent> ComponentsMap; - typedef std::map<std::string, cmCPackComponentGroup> ComponentGoupsMap; - typedef std::map<std::string, cmCPackIFWPackage::DependenceStruct> - DependenceMap; + using PackagesMap = std::map<std::string, cmCPackIFWPackage>; + using RepositoriesMap = std::map<std::string, cmCPackIFWRepository>; + using ComponentsMap = std::map<std::string, cmCPackComponent>; + using ComponentGoupsMap = std::map<std::string, cmCPackComponentGroup>; + using DependenceMap = + std::map<std::string, cmCPackIFWPackage::DependenceStruct>; using cmCPackIFWCommon::GetOption; using cmCPackIFWCommon::IsOn; diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.h b/Source/CPack/IFW/cmCPackIFWInstaller.h index be51fa5..467779e 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.h +++ b/Source/CPack/IFW/cmCPackIFWInstaller.h @@ -22,8 +22,8 @@ class cmCPackIFWInstaller : public cmCPackIFWCommon public: // Types - typedef std::map<std::string, cmCPackIFWPackage*> PackagesMap; - typedef std::vector<cmCPackIFWRepository*> RepositoriesVector; + using PackagesMap = std::map<std::string, cmCPackIFWPackage*>; + using RepositoriesVector = std::vector<cmCPackIFWRepository*>; public: // Constructor diff --git a/Source/CPack/IFW/cmCPackIFWRepository.h b/Source/CPack/IFW/cmCPackIFWRepository.h index 227cfae..585334c 100644 --- a/Source/CPack/IFW/cmCPackIFWRepository.h +++ b/Source/CPack/IFW/cmCPackIFWRepository.h @@ -28,7 +28,7 @@ public: Replace }; - typedef std::vector<cmCPackIFWRepository*> RepositoriesVector; + using RepositoriesVector = std::vector<cmCPackIFWRepository*>; public: // Constructor diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.h b/Source/CPack/WiX/cmCPackWIXGenerator.h index f8c7644..3b72e38 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.h +++ b/Source/CPack/WiX/cmCPackWIXGenerator.h @@ -44,9 +44,9 @@ protected: bool SupportsComponentInstallation() const override { return true; } private: - typedef std::map<std::string, std::string> id_map_t; - typedef std::map<std::string, size_t> ambiguity_map_t; - typedef std::set<std::string> extension_set_t; + using id_map_t = std::map<std::string, std::string>; + using ambiguity_map_t = std::map<std::string, size_t>; + using extension_set_t = std::set<std::string>; enum class DefinitionType { diff --git a/Source/CPack/WiX/cmWIXPatchParser.h b/Source/CPack/WiX/cmWIXPatchParser.h index 52c7e35..e0e3470 100644 --- a/Source/CPack/WiX/cmWIXPatchParser.h +++ b/Source/CPack/WiX/cmWIXPatchParser.h @@ -36,8 +36,8 @@ struct cmWIXPatchElement : cmWIXPatchNode ~cmWIXPatchElement(); - typedef std::vector<cmWIXPatchNode*> child_list_t; - typedef std::map<std::string, std::string> attributes_t; + using child_list_t = std::vector<cmWIXPatchNode*>; + using attributes_t = std::map<std::string, std::string>; std::string name; child_list_t children; @@ -50,7 +50,7 @@ struct cmWIXPatchElement : cmWIXPatchNode class cmWIXPatchParser : public cmXMLParser { public: - typedef std::map<std::string, cmWIXPatchElement> fragment_map_t; + using fragment_map_t = std::map<std::string, cmWIXPatchElement>; cmWIXPatchParser(fragment_map_t& Fragments, cmCPackLog* logger); diff --git a/Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx b/Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx index 2c99a22..751f7dc 100644 --- a/Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx +++ b/Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx @@ -25,7 +25,7 @@ cmWIXRichTextFormatWriter::~cmWIXRichTextFormatWriter() void cmWIXRichTextFormatWriter::AddText(std::string const& text) { - typedef unsigned char rtf_byte_t; + using rtf_byte_t = unsigned char; for (size_t i = 0; i < text.size(); ++i) { rtf_byte_t c = rtf_byte_t(text[i]); diff --git a/Source/CPack/WiX/cmWIXShortcut.h b/Source/CPack/WiX/cmWIXShortcut.h index 23ddc6a..d9eecdf 100644 --- a/Source/CPack/WiX/cmWIXShortcut.h +++ b/Source/CPack/WiX/cmWIXShortcut.h @@ -28,8 +28,8 @@ public: STARTUP }; - typedef std::vector<cmWIXShortcut> shortcut_list_t; - typedef std::map<std::string, shortcut_list_t> shortcut_id_map_t; + using shortcut_list_t = std::vector<cmWIXShortcut>; + using shortcut_id_map_t = std::map<std::string, shortcut_list_t>; void insert(Type type, std::string const& id, cmWIXShortcut const& shortcut); @@ -46,7 +46,7 @@ public: cmInstalledFile const& installedFile); private: - typedef std::map<Type, shortcut_id_map_t> shortcut_type_map_t; + using shortcut_type_map_t = std::map<Type, shortcut_id_map_t>; void CreateFromProperty(std::string const& propertyName, Type type, std::string const& id, diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h index f5be0aa..461df66 100644 --- a/Source/CPack/cmCPackArchiveGenerator.h +++ b/Source/CPack/cmCPackArchiveGenerator.h @@ -22,7 +22,7 @@ class cmCPackComponent; class cmCPackArchiveGenerator : public cmCPackGenerator { public: - typedef cmCPackGenerator Superclass; + using Superclass = cmCPackGenerator; static cmCPackGenerator* Create7ZGenerator(); static cmCPackGenerator* CreateTBZ2Generator(); diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index 3c06d41..fc00b09 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -326,7 +326,7 @@ protected: }; #define cmCPackTypeMacro(klass, superclass) \ - typedef superclass Superclass; \ + using Superclass = superclass; \ const char* GetNameOfClass() override { return #klass; } \ static cmCPackGenerator* CreateGenerator() { return new klass; } \ class cmCPackTypeMacro_UseTrailingSemicolon diff --git a/Source/CPack/cmCPackGeneratorFactory.h b/Source/CPack/cmCPackGeneratorFactory.h index 972f0f7..da2eb8d 100644 --- a/Source/CPack/cmCPackGeneratorFactory.h +++ b/Source/CPack/cmCPackGeneratorFactory.h @@ -29,7 +29,7 @@ public: cmCPackGenerator* NewGenerator(const std::string& name); void DeleteGenerator(cmCPackGenerator* gen); - typedef cmCPackGenerator* CreateGeneratorCall(); + using CreateGeneratorCall = cmCPackGenerator*(); void RegisterGenerator(const std::string& name, const char* generatorDescription, @@ -37,7 +37,7 @@ public: void SetLogger(cmCPackLog* logger) { this->Logger = logger; } - typedef std::map<std::string, std::string> DescriptionsMap; + using DescriptionsMap = std::map<std::string, std::string>; const DescriptionsMap& GetGeneratorsList() const { return this->GeneratorDescriptions; @@ -47,7 +47,7 @@ private: cmCPackGenerator* NewGeneratorInternal(const std::string& name); std::vector<cmCPackGenerator*> Generators; - typedef std::map<std::string, CreateGeneratorCall*> t_GeneratorCreatorsMap; + using t_GeneratorCreatorsMap = std::map<std::string, CreateGeneratorCall*>; t_GeneratorCreatorsMap GeneratorCreators; DescriptionsMap GeneratorDescriptions; cmCPackLog* Logger; diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index b4b320d..08681ec 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -66,7 +66,7 @@ int cpackUnknownArgument(const char* /*unused*/, void* /*unused*/) struct cpackDefinitions { - typedef std::map<std::string, std::string> MapType; + using MapType = std::map<std::string, std::string>; MapType Map; cmCPackLog* Log; }; |