summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestBuildHandler.cxx
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2019-01-16 06:13:07 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-17 18:12:02 (GMT)
commitef61997b1be5c2f542472f8eb48dac62cd26bf5c (patch)
tree3d17442b633d74e8e18f4f4c48578f3b639d25be /Source/CTest/cmCTestBuildHandler.cxx
parent2e5307a2a45d456b7fb52e4d3fab1416dc9a1bd8 (diff)
downloadCMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.zip
CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.tar.gz
CMake-ef61997b1be5c2f542472f8eb48dac62cd26bf5c.tar.bz2
clang-tidy: Use emplace
Diffstat (limited to 'Source/CTest/cmCTestBuildHandler.cxx')
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index 361883c..d07bd21 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -341,17 +341,17 @@ int cmCTestBuildHandler::ProcessHandler()
// warnings and warning exceptions.
std::vector<std::string>::size_type cc;
for (cc = 0; cmCTestErrorMatches[cc]; cc++) {
- this->CustomErrorMatches.push_back(cmCTestErrorMatches[cc]);
+ this->CustomErrorMatches.emplace_back(cmCTestErrorMatches[cc]);
}
for (cc = 0; cmCTestErrorExceptions[cc]; cc++) {
- this->CustomErrorExceptions.push_back(cmCTestErrorExceptions[cc]);
+ this->CustomErrorExceptions.emplace_back(cmCTestErrorExceptions[cc]);
}
for (cc = 0; cmCTestWarningMatches[cc]; cc++) {
- this->CustomWarningMatches.push_back(cmCTestWarningMatches[cc]);
+ this->CustomWarningMatches.emplace_back(cmCTestWarningMatches[cc]);
}
for (cc = 0; cmCTestWarningExceptions[cc]; cc++) {
- this->CustomWarningExceptions.push_back(cmCTestWarningExceptions[cc]);
+ this->CustomWarningExceptions.emplace_back(cmCTestWarningExceptions[cc]);
}
// Pre-compile regular expressions objects for all regular expressions
@@ -365,7 +365,7 @@ int cmCTestBuildHandler::ProcessHandler()
cmCTestOptionalLog(this->CTest, DEBUG, \
"Add " #strings ": " << s << std::endl, \
this->Quiet); \
- (regexes).push_back(s.c_str()); \
+ (regexes).emplace_back(s); \
} \
} while (false)
@@ -1034,7 +1034,7 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, size_t length,
}
} else {
// Otherwise store pre-context for the next error
- this->PreContext.push_back(line);
+ this->PreContext.emplace_back(line);
if (this->PreContext.size() > this->MaxPreContext) {
this->PreContext.erase(this->PreContext.begin(),
this->PreContext.end() -