summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestMemCheckHandler.cxx
diff options
context:
space:
mode:
authorPavel Solodovnikov <hellyeahdominate@gmail.com>2017-09-15 23:26:49 (GMT)
committerPavel Solodovnikov <hellyeahdominate@gmail.com>2017-09-15 23:26:49 (GMT)
commit5db3aac11177e3487544d02beecbaddb500d4c65 (patch)
treed830a38f27f27366405cf948c9c5919564beac9b /Source/CTest/cmCTestMemCheckHandler.cxx
parentc0c5f924fe46fcf83603117689b372cb8520c4bb (diff)
downloadCMake-5db3aac11177e3487544d02beecbaddb500d4c65.zip
CMake-5db3aac11177e3487544d02beecbaddb500d4c65.tar.gz
CMake-5db3aac11177e3487544d02beecbaddb500d4c65.tar.bz2
Meta: replace empty-string assignments with `clear()`.
Diffstat (limited to 'Source/CTest/cmCTestMemCheckHandler.cxx')
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index 1058806..40117bc 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -122,11 +122,11 @@ void cmCTestMemCheckHandler::Initialize()
this->LogWithPID = false;
this->CustomMaximumPassedTestOutputSize = 0;
this->CustomMaximumFailedTestOutputSize = 0;
- this->MemoryTester = "";
+ this->MemoryTester.clear();
this->MemoryTesterDynamicOptions.clear();
this->MemoryTesterOptions.clear();
this->MemoryTesterStyle = UNKNOWN;
- this->MemoryTesterOutputFile = "";
+ this->MemoryTesterOutputFile.clear();
this->DefectCount = 0;
}
@@ -417,8 +417,8 @@ void cmCTestMemCheckHandler::GenerateDartOutput(cmXMLWriter& xml)
bool cmCTestMemCheckHandler::InitializeMemoryChecking()
{
- this->MemoryTesterEnvironmentVariable = "";
- this->MemoryTester = "";
+ this->MemoryTesterEnvironmentVariable.clear();
+ this->MemoryTester.clear();
// Setup the command
if (cmSystemTools::FileExists(
this->CTest->GetCTestConfiguration("MemoryCheckCommand").c_str())) {
@@ -725,7 +725,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckSanitizerOutput(
std::vector<std::string> lines;
cmSystemTools::Split(str.c_str(), lines);
std::ostringstream ostr;
- log = "";
+ log.clear();
for (std::string const& l : lines) {
std::string resultFound;
if (leakWarning.find(l)) {
@@ -755,7 +755,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput(
std::vector<std::string> lines;
cmSystemTools::Split(str.c_str(), lines);
std::ostringstream ostr;
- log = "";
+ log.clear();
cmsys::RegularExpression pfW("^\\[[WEI]\\] ([A-Z][A-Z][A-Z][A-Z]*): ");
@@ -805,7 +805,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput(
std::string::size_type cc;
std::ostringstream ostr;
- log = "";
+ log.clear();
int defects = 0;
@@ -928,7 +928,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput(
bool cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput(
const std::string& str, std::string& log, std::vector<int>& results)
{
- log = "";
+ log.clear();
double sttime = cmSystemTools::GetTime();
std::vector<std::string> lines;
cmSystemTools::Split(str.c_str(), lines);
@@ -1079,7 +1079,7 @@ void cmCTestMemCheckHandler::TestOutputFileNames(
if (g.GetFiles().empty()) {
std::string log = "Cannot find memory tester output file: " + ofile;
cmCTestLog(this->CTest, ERROR_MESSAGE, log << std::endl);
- ofile = "";
+ ofile.clear();
} else {
files = g.GetFiles();
return;
@@ -1087,7 +1087,7 @@ void cmCTestMemCheckHandler::TestOutputFileNames(
} else if (!cmSystemTools::FileExists(ofile.c_str())) {
std::string log = "Cannot find memory tester output file: " + ofile;
cmCTestLog(this->CTest, ERROR_MESSAGE, log << std::endl);
- ofile = "";
+ ofile.clear();
}
files.push_back(ofile);
}