From 98175168f349985690896524595936cbd9e5269a Mon Sep 17 00:00:00 2001 From: Urs Fleisch Date: Sat, 20 Jan 2024 16:45:48 +0100 Subject: [PATCH] Inspection: Declaration and assignment can be joined --- tests/test_bytevector.cpp | 3 +-- tests/test_string.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_bytevector.cpp b/tests/test_bytevector.cpp index 20e50467..0410fc53 100644 --- a/tests/test_bytevector.cpp +++ b/tests/test_bytevector.cpp @@ -405,8 +405,7 @@ public: CPPUNIT_ASSERT_EQUAL(ByteVector("taglib"), v1); CPPUNIT_ASSERT_EQUAL(ByteVector("tAglIb"), v2); - ByteVector v3; - v3 = ByteVector("0123456789").mid(3, 4); + ByteVector v3 = ByteVector("0123456789").mid(3, 4); it1 = v3.begin(); it2 = v3.end() - 1; diff --git a/tests/test_string.cpp b/tests/test_string.cpp index a03772f1..c0a947d4 100644 --- a/tests/test_string.cpp +++ b/tests/test_string.cpp @@ -84,8 +84,7 @@ public: String latin = "Jos\xe9 Carlos"; CPPUNIT_ASSERT(strcmp(latin.toCString(true), "José Carlos") == 0); - String c; - c = "1"; + String c = "1"; CPPUNIT_ASSERT(c == L"1"); c = L'\u4E00';