summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-01-21 12:51:46 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-01-21 12:51:54 (GMT)
commit4dba5d6ce251257259874bce394b2fba954e200c (patch)
treef775a504eb80d0383231fb99eb301a962a989fb2 /Source/cmFindPackageCommand.cxx
parent7e5f9b192e9c3ed7130e1e52b7f9d3243f51e2ab (diff)
parentef61997b1be5c2f542472f8eb48dac62cd26bf5c (diff)
downloadCMake-4dba5d6ce251257259874bce394b2fba954e200c.zip
CMake-4dba5d6ce251257259874bce394b2fba954e200c.tar.gz
CMake-4dba5d6ce251257259874bce394b2fba954e200c.tar.bz2
Merge topic 'use-emplace'
ef61997b1b clang-tidy: Use emplace 2e5307a2a4 CTestSVN: Accept std::string in SVNInfo constructor Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2811
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r--Source/cmFindPackageCommand.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 2567b7a..9ae1cb9 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -1858,7 +1858,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);
}
}
}
@@ -1917,7 +1917,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);
}
}
}
@@ -2080,16 +2080,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).*/
{