summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestBuildHandler.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-19 12:26:30 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-09-19 12:27:00 (GMT)
commit7c28081c147e2eb6c7ad6dee0aada77219af7a6d (patch)
tree92f007052e873070f18bd07f7b24a42bdc1160cc /Source/CTest/cmCTestBuildHandler.cxx
parent8fee054ecaf039d4253a2e9cfeafb3c154704808 (diff)
parent5db3aac11177e3487544d02beecbaddb500d4c65 (diff)
downloadCMake-7c28081c147e2eb6c7ad6dee0aada77219af7a6d.zip
CMake-7c28081c147e2eb6c7ad6dee0aada77219af7a6d.tar.gz
CMake-7c28081c147e2eb6c7ad6dee0aada77219af7a6d.tar.bz2
Merge topic 'string-clear'
5db3aac1 Meta: replace empty-string assignments with `clear()`. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1276
Diffstat (limited to 'Source/CTest/cmCTestBuildHandler.cxx')
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index 361b43b..28fc113 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -171,8 +171,8 @@ cmCTestBuildHandler::cmCTestBuildHandler()
void cmCTestBuildHandler::Initialize()
{
this->Superclass::Initialize();
- this->StartBuild = "";
- this->EndBuild = "";
+ this->StartBuild.clear();
+ this->EndBuild.clear();
this->CustomErrorMatches.clear();
this->CustomErrorExceptions.clear();
this->CustomWarningMatches.clear();
@@ -190,8 +190,8 @@ void cmCTestBuildHandler::Initialize()
this->BuildOutputLogSize = 0;
this->CurrentProcessingLine.clear();
- this->SimplifySourceDir = "";
- this->SimplifyBuildDir = "";
+ this->SimplifySourceDir.clear();
+ this->SimplifyBuildDir.clear();
this->OutputLineCounter = 0;
this->ErrorsAndWarnings.clear();
this->LastErrorOrWarning = this->ErrorsAndWarnings.end();
@@ -371,8 +371,8 @@ int cmCTestBuildHandler::ProcessHandler()
this->WarningExceptionRegex);
// Determine source and binary tree substitutions to simplify the output.
- this->SimplifySourceDir = "";
- this->SimplifyBuildDir = "";
+ this->SimplifySourceDir.clear();
+ this->SimplifyBuildDir.clear();
if (this->CTest->GetCTestConfiguration("SourceDirectory").size() > 20) {
std::string srcdir =
this->CTest->GetCTestConfiguration("SourceDirectory") + "/";
@@ -888,8 +888,8 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
errorwarning.Text =
"*** WARNING non-zero return value in ctest from: ";
errorwarning.Text += argv[0];
- errorwarning.PreContext = "";
- errorwarning.PostContext = "";
+ errorwarning.PreContext.clear();
+ errorwarning.PostContext.clear();
errorwarning.Error = false;
this->ErrorsAndWarnings.push_back(errorwarning);
this->TotalWarnings++;
@@ -911,8 +911,8 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
errorwarning.LogLine = 1;
errorwarning.Text = "*** ERROR executing: ";
errorwarning.Text += cmsysProcess_GetErrorString(cp);
- errorwarning.PreContext = "";
- errorwarning.PostContext = "";
+ errorwarning.PreContext.clear();
+ errorwarning.PostContext.clear();
errorwarning.Error = true;
this->ErrorsAndWarnings.push_back(errorwarning);
this->TotalErrors++;
@@ -996,8 +996,8 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, size_t length,
// This is an error or warning, so generate report
errorwarning.LogLine = static_cast<int>(this->OutputLineCounter + 1);
errorwarning.Text = line;
- errorwarning.PreContext = "";
- errorwarning.PostContext = "";
+ errorwarning.PreContext.clear();
+ errorwarning.PostContext.clear();
// Copy pre-context to report
for (std::string const& pc : this->PreContext) {