Commit 420c3b04 authored by Rolf Eike Beer's avatar Rolf Eike Beer
Browse files

call std::string::clear() instead of assigning ""

parent 8b1a29e1
......@@ -388,7 +388,6 @@ bool Glob::FindFiles(const std::string& inexpr, GlobMessages* messages)
expr = expr.substr(skip);
}
cexpr = "";
for (cc = 0; cc < expr.size(); cc++) {
int ch = expr[cc];
if (ch == '/') {
......
......@@ -3132,7 +3132,7 @@ bool SystemTools::SplitProgramPath(const std::string& in_name,
std::string& dir, std::string& file, bool)
{
dir = in_name;
file = "";
file.clear();
SystemTools::ConvertToUnixSlashes(dir);
if (!SystemTools::FileIsDirectory(dir)) {
......@@ -3142,7 +3142,7 @@ bool SystemTools::SplitProgramPath(const std::string& in_name,
dir = dir.substr(0, slashPos);
} else {
file = dir;
dir = "";
dir.clear();
}
}
if (!(dir.empty()) && !SystemTools::FileIsDirectory(dir)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment