Commit 6c8f50b5 authored by Rosen Penev's avatar Rosen Penev Committed by Andreas Schuh

[clang-tidy] Remove redundant initialization of strings

Found with readability-redundant-string-init
Signed-off-by: 's avatarRosen Penev <rosenp@gmail.com>
parent 6d224d34
...@@ -123,7 +123,7 @@ string DescribeOneFlag(const CommandLineFlagInfo& flag) { ...@@ -123,7 +123,7 @@ string DescribeOneFlag(const CommandLineFlagInfo& flag) {
flag.description.c_str()); flag.description.c_str());
const char* c_string = main_part.c_str(); const char* c_string = main_part.c_str();
int chars_left = static_cast<int>(main_part.length()); int chars_left = static_cast<int>(main_part.length());
string final_string = ""; string final_string;
int chars_in_line = 0; // how many chars in current line so far? int chars_in_line = 0; // how many chars in current line so far?
while (1) { while (1) {
assert(static_cast<size_t>(chars_left) assert(static_cast<size_t>(chars_left)
...@@ -353,7 +353,7 @@ static void ShowVersion() { ...@@ -353,7 +353,7 @@ static void ShowVersion() {
static void AppendPrognameStrings(vector<string>* substrings, static void AppendPrognameStrings(vector<string>* substrings,
const char* progname) { const char* progname) {
string r(""); string r;
r += PATH_SEPARATOR; r += PATH_SEPARATOR;
r += progname; r += progname;
substrings->push_back(r + "."); substrings->push_back(r + ".");
......
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