diff options
author | Regina Pfeifer <regina@mailbox.org> | 2019-01-16 06:13:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-17 18:12:02 (GMT) |
commit | ef61997b1be5c2f542472f8eb48dac62cd26bf5c (patch) | |
tree | 3d17442b633d74e8e18f4f4c48578f3b639d25be /Source/cmFindPackageCommand.cxx | |
parent | 2e5307a2a45d456b7fb52e4d3fab1416dc9a1bd8 (diff) | |
download | CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.zip CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.tar.gz CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.tar.bz2 |
clang-tidy: Use emplace
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 8dc7ca2..26f8f87 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -1848,7 +1848,7 @@ private: } for (std::string const& n : this->Names) { if (cmsysString_strncasecmp(fname, n.c_str(), n.length()) == 0) { - matches.push_back(fname); + matches.emplace_back(fname); } } } @@ -1907,7 +1907,7 @@ private: for (std::string name : this->Names) { name += this->Extension; if (cmsysString_strcasecmp(fname, name.c_str()) == 0) { - matches.push_back(fname); + matches.emplace_back(fname); } } } @@ -2070,16 +2070,16 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in) common.push_back("lib/" + this->LibraryArchitecture); } if (this->UseLib32Paths) { - common.push_back("lib32"); + common.emplace_back("lib32"); } if (this->UseLib64Paths) { - common.push_back("lib64"); + common.emplace_back("lib64"); } if (this->UseLibx32Paths) { - common.push_back("libx32"); + common.emplace_back("libx32"); } - common.push_back("lib"); - common.push_back("share"); + common.emplace_back("lib"); + common.emplace_back("share"); // PREFIX/(lib/ARCH|lib*|share)/cmake/(Foo|foo|FOO).*/ { |