From bd22a18dc1bedd61e0bfe8c29396e1eadf5321c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 8 May 2010 09:49:01 +0200 Subject: [PATCH] Refactoring: Changed 'possible style' to 'style' --- lib/checkother.cpp | 4 ++-- test/testother.cpp | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index f25437512..9a22e8586 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -3602,12 +3602,12 @@ void CheckOther::emptyStringTestError(const Token *tok, const std::string &var_n { if (isTestForEmpty) { - reportError(tok, Severity::possibleStyle, + reportError(tok, Severity::style, "emptyStringTest", "Empty string test can be simplified to \"*" + var_name + " == '\\0'\""); } else { - reportError(tok, Severity::possibleStyle, + reportError(tok, Severity::style, "emptyStringTest", "Non-empty string test can be simplified to \"*" + var_name + " != '\\0'\""); } } diff --git a/test/testother.cpp b/test/testother.cpp index da9b813c1..b98acf3e4 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -2448,31 +2448,31 @@ private: " std::cout << str;\n" " }\n" "}\n"); - ASSERT_EQUALS("[test.cpp:3]: (possible style) Empty string test can be simplified to \"*str == '\\0'\"\n", errout.str()); + ASSERT_EQUALS("[test.cpp:3]: (style) Empty string test can be simplified to \"*str == '\\0'\"\n", errout.str()); check("if (!strlen(str)) { }"); - ASSERT_EQUALS("[test.cpp:1]: (possible style) Empty string test can be simplified to \"*str == '\\0'\"\n", errout.str()); + ASSERT_EQUALS("[test.cpp:1]: (style) Empty string test can be simplified to \"*str == '\\0'\"\n", errout.str()); check("if (strlen(str) == 0) { }"); - ASSERT_EQUALS("[test.cpp:1]: (possible style) Empty string test can be simplified to \"*str == '\\0'\"\n", errout.str()); + ASSERT_EQUALS("[test.cpp:1]: (style) Empty string test can be simplified to \"*str == '\\0'\"\n", errout.str()); check("if (strlen(str)) { }"); - ASSERT_EQUALS("[test.cpp:1]: (possible style) Non-empty string test can be simplified to \"*str != '\\0'\"\n", errout.str()); + ASSERT_EQUALS("[test.cpp:1]: (style) Non-empty string test can be simplified to \"*str != '\\0'\"\n", errout.str()); check("if (strlen(str) > 0) { }"); - ASSERT_EQUALS("[test.cpp:1]: (possible style) Non-empty string test can be simplified to \"*str != '\\0'\"\n", errout.str()); + ASSERT_EQUALS("[test.cpp:1]: (style) Non-empty string test can be simplified to \"*str != '\\0'\"\n", errout.str()); check("if (strlen(str) != 0) { }"); - ASSERT_EQUALS("[test.cpp:1]: (possible style) Non-empty string test can be simplified to \"*str != '\\0'\"\n", errout.str()); + ASSERT_EQUALS("[test.cpp:1]: (style) Non-empty string test can be simplified to \"*str != '\\0'\"\n", errout.str()); check("if (0 != strlen(str)) { }"); - ASSERT_EQUALS("[test.cpp:1]: (possible style) Non-empty string test can be simplified to \"*str != '\\0'\"\n", errout.str()); + ASSERT_EQUALS("[test.cpp:1]: (style) Non-empty string test can be simplified to \"*str != '\\0'\"\n", errout.str()); check("if (0 == strlen(str)) { }"); - ASSERT_EQUALS("[test.cpp:1]: (possible style) Empty string test can be simplified to \"*str == '\\0'\"\n", errout.str()); + ASSERT_EQUALS("[test.cpp:1]: (style) Empty string test can be simplified to \"*str == '\\0'\"\n", errout.str()); check("if (0 < strlen(str)) { }"); - ASSERT_EQUALS("[test.cpp:1]: (possible style) Non-empty string test can be simplified to \"*str != '\\0'\"\n", errout.str()); + ASSERT_EQUALS("[test.cpp:1]: (style) Non-empty string test can be simplified to \"*str != '\\0'\"\n", errout.str()); } void fflushOnInputStreamTest()