From 5b09c859f7217483cba531a6dd0b84e630301471 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 31 Oct 2019 13:21:57 -0700 Subject: [PATCH] [clang-tidy] Remove redundant initialization of strings Found with readability-redundant-string-init Signed-off-by: Rosen Penev --- src/gflags_reporting.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gflags_reporting.cc b/src/gflags_reporting.cc index 6664d64..b6cccba 100644 --- a/src/gflags_reporting.cc +++ b/src/gflags_reporting.cc @@ -123,7 +123,7 @@ string DescribeOneFlag(const CommandLineFlagInfo& flag) { flag.description.c_str()); const char* c_string = main_part.c_str(); int chars_left = static_cast(main_part.length()); - string final_string = ""; + string final_string; int chars_in_line = 0; // how many chars in current line so far? while (1) { assert(static_cast(chars_left) @@ -353,7 +353,7 @@ static void ShowVersion() { static void AppendPrognameStrings(vector* substrings, const char* progname) { - string r(""); + string r; r += PATH_SEPARATOR; r += progname; substrings->push_back(r + ".");