From 90656bf081fde45eb6e1aab2cd50a3a2b8dd17c8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 8 Jun 2017 03:51:32 +0300 Subject: Remove useless string initialisations. --- src/utils/stringutils_unittest.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/utils') diff --git a/src/utils/stringutils_unittest.cc b/src/utils/stringutils_unittest.cc index a6c187ac5..354232965 100644 --- a/src/utils/stringutils_unittest.cc +++ b/src/utils/stringutils_unittest.cc @@ -224,7 +224,7 @@ TEST_CASE("stringuntils parseNumber 1", "") TEST_CASE("stringuntils removeToken 1", "") { - std::string str = ""; + std::string str; REQUIRE(removeToken(str, " ").empty()); REQUIRE(str.empty()); @@ -292,8 +292,8 @@ TEST_CASE("stringuntils removeColors 1", "") TEST_CASE("stringuntils compareStrI 1", "") { - std::string str1 = ""; - std::string str2 = ""; + std::string str1; + std::string str2; REQUIRE(0 == compareStrI(str1, str2)); str1 = "test"; @@ -326,8 +326,8 @@ TEST_CASE("stringuntils isWordSeparator 1", "") TEST_CASE("stringuntils findSameSubstring", "") { - std::string str1 = ""; - std::string str2 = ""; + std::string str1; + std::string str2; REQUIRE(findSameSubstring("", "").empty()); @@ -346,8 +346,8 @@ TEST_CASE("stringuntils findSameSubstring", "") TEST_CASE("stringuntils findSameSubstringI", "") { - std::string str1 = ""; - std::string str2 = ""; + std::string str1; + std::string str2; REQUIRE(findSameSubstringI("", "").empty()); @@ -524,9 +524,9 @@ TEST_CASE("stringuntils getFileDir 1", "") TEST_CASE("stringuntils replaceAll 1", "") { - std::string str1 = ""; - std::string str2 = ""; - std::string str3 = ""; + std::string str1; + std::string str2; + std::string str3; REQUIRE(replaceAll(str1, str2, str3).empty()); -- cgit v1.2.3-70-g09d2