summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.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/cmMakefile.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/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 845568b..e51cfcc 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1645,7 +1645,7 @@ void cmMakefile::AddCacheDefinition(const std::string& name, const char* value,
nvalue = value ? value : "";
cmSystemTools::ExpandListArgument(nvalue, files);
- nvalue = "";
+ nvalue.clear();
for (cc = 0; cc < files.size(); cc++) {
if (!cmSystemTools::IsOff(files[cc].c_str())) {
files[cc] = cmSystemTools::CollapseFullPath(files[cc]);
@@ -2448,7 +2448,7 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringOld(
std::string input = source;
// Start with empty output.
- source = "";
+ source.clear();
// Look for one @VAR@ at a time.
const char* in = input.c_str();
@@ -3348,7 +3348,7 @@ std::string cmMakefile::GetModulesFile(const char* filename) const
moduleInCMakeRoot += filename;
cmSystemTools::ConvertToUnixSlashes(moduleInCMakeRoot);
if (!cmSystemTools::FileExists(moduleInCMakeRoot.c_str())) {
- moduleInCMakeRoot = "";
+ moduleInCMakeRoot.clear();
}
// Normally, prefer the files found in CMAKE_MODULE_PATH. Only when the file
@@ -3532,7 +3532,7 @@ int cmMakefile::ConfigureFile(const char* infile, const char* outfile,
std::string inLine;
std::string outLine;
while (cmSystemTools::GetLineFromStream(fin, inLine)) {
- outLine = "";
+ outLine.clear();
this->ConfigureString(inLine, outLine, atOnly, escapeQuotes);
fout << outLine << newLineCharacters;
}