diff options
Diffstat (limited to 'Source/CTest/cmCTestBuildHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestBuildHandler.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index 2acf5e8..ad28d92 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -18,6 +18,7 @@ #include <set> #include <stdlib.h> #include <string.h> +#include <utility> static const char* cmCTestErrorMatches[] = { "^[Bb]us [Ee]rror", @@ -295,7 +296,7 @@ int cmCTestBuildHandler::ProcessHandler() cmCTestWarningErrorFileLine[entry].RegularExpressionString)) { r.FileIndex = cmCTestWarningErrorFileLine[entry].FileIndex; r.LineIndex = cmCTestWarningErrorFileLine[entry].LineIndex; - this->ErrorWarningFileLineRegex.push_back(r); + this->ErrorWarningFileLineRegex.push_back(std::move(r)); } else { cmCTestLog( this->CTest, ERROR_MESSAGE, "Problem Compiling regular expression: " @@ -895,7 +896,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal, errorwarning.PreContext.clear(); errorwarning.PostContext.clear(); errorwarning.Error = false; - this->ErrorsAndWarnings.push_back(errorwarning); + this->ErrorsAndWarnings.push_back(std::move(errorwarning)); this->TotalWarnings++; } } @@ -918,7 +919,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal, errorwarning.PreContext.clear(); errorwarning.PostContext.clear(); errorwarning.Error = true; - this->ErrorsAndWarnings.push_back(errorwarning); + this->ErrorsAndWarnings.push_back(std::move(errorwarning)); this->TotalErrors++; cmCTestLog(this->CTest, ERROR_MESSAGE, "There was an error: " << cmsysProcess_GetErrorString(cp) << std::endl); @@ -1010,7 +1011,7 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, size_t length, this->PreContext.clear(); // Store report - this->ErrorsAndWarnings.push_back(errorwarning); + this->ErrorsAndWarnings.push_back(std::move(errorwarning)); this->LastErrorOrWarning = this->ErrorsAndWarnings.end() - 1; this->PostContextCount = 0; } else { |