Merge pull request #1787 from neheb/str

[clang-tidy] remove pointless string init
This commit is contained in:
Jan Niklas Hasse 2020-11-10 11:34:44 +00:00 committed by GitHub
commit 3094b5c289
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -3,9 +3,11 @@ Checks: '
,readability-avoid-const-params-in-decls, ,readability-avoid-const-params-in-decls,
,readability-non-const-parameter, ,readability-non-const-parameter,
,readability-redundant-string-cstr, ,readability-redundant-string-cstr,
,readability-redundant-string-init,
' '
WarningsAsErrors: ' WarningsAsErrors: '
,readability-avoid-const-params-in-decls, ,readability-avoid-const-params-in-decls,
,readability-non-const-parameter, ,readability-non-const-parameter,
,readability-redundant-string-cstr, ,readability-redundant-string-cstr,
,readability-redundant-string-init,
' '

View File

@ -31,7 +31,7 @@ TEST(StringPieceUtilTest, SplitStringPiece) {
} }
{ {
string empty(""); string empty;
vector<StringPiece> list = SplitStringPiece(empty, ':'); vector<StringPiece> list = SplitStringPiece(empty, ':');
EXPECT_EQ(list.size(), 1); EXPECT_EQ(list.size(), 1);
@ -82,7 +82,7 @@ TEST(StringPieceUtilTest, JoinStringPiece) {
} }
{ {
string empty(""); string empty;
vector<StringPiece> list = SplitStringPiece(empty, ':'); vector<StringPiece> list = SplitStringPiece(empty, ':');
EXPECT_EQ("", JoinStringPiece(list, ':')); EXPECT_EQ("", JoinStringPiece(list, ':'));