Revert "[cl;ang-tidy] Don't initialize strings"

This reverts commit 426e067f43.
This commit is contained in:
Paul Beckingham
2020-12-05 16:18:15 -05:00
parent 3eb209f248
commit 9016c26828
4 changed files with 10 additions and 10 deletions

View File

@@ -103,7 +103,7 @@ int confirm4 (const std::string& question)
<< options[5]
<< ") ";
std::string answer;
std::string answer {""};
std::getline (std::cin, answer);
Context::getContext ().debug ("STDIN '" + answer + '\'');
answer = std::cin.eof () ? STRING_UTIL_CONFIRM_QUIT : Lexer::lowerCase (Lexer::trim (answer));
@@ -204,7 +204,7 @@ const std::string indentProject (
char delimiter /* = '.' */)
{
// Count the delimiters in *i.
std::string prefix;
std::string prefix = "";
std::string::size_type pos = 0;
std::string::size_type lastpos = 0;
while ((pos = project.find (delimiter, pos + 1)) != std::string::npos)
@@ -216,7 +216,7 @@ const std::string indentProject (
}
}
std::string child;
std::string child = "";
if (lastpos == 0)
child = project;
else