diff options
author | Brad King <brad.king@kitware.com> | 2019-01-21 12:51:46 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-01-21 12:51:54 (GMT) |
commit | 4dba5d6ce251257259874bce394b2fba954e200c (patch) | |
tree | f775a504eb80d0383231fb99eb301a962a989fb2 /Source/CTest/cmCTestBuildHandler.cxx | |
parent | 7e5f9b192e9c3ed7130e1e52b7f9d3243f51e2ab (diff) | |
parent | ef61997b1be5c2f542472f8eb48dac62cd26bf5c (diff) | |
download | CMake-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/CTest/cmCTestBuildHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestBuildHandler.cxx | 12 |
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() - |