diff --git a/conversion/stringconversion.h b/conversion/stringconversion.h index 65659cd..23a2f11 100644 --- a/conversion/stringconversion.h +++ b/conversion/stringconversion.h @@ -249,7 +249,7 @@ template bool endsWith(const StringType &str, const String if (str.size() < phrase.size()) { return false; } - for (auto stri = str.cend() - phrase.size(), strend = str.cend(), phrasei = phrase.cbegin(); stri != strend; ++stri, ++phrasei) { + for (auto stri = str.cend() - phrase.size(), strend = str.cend(), phrasei = phrase.cbegin(); stri != strend; ++stri, ++phrasei) { if (*stri != *phrasei) { return false; } @@ -266,7 +266,7 @@ template bool endsWith(const StringType &str, const typena if (str.size() < phraseSize) { return false; } - for (auto stri = str.cend() - phraseSize, strend = str.cend(); stri != strend; ++stri, ++phrase) { + for (auto stri = str.cend() - phraseSize, strend = str.cend(); stri != strend; ++stri, ++phrase) { if (*stri != *phrase) { return false; } diff --git a/tests/iotests.cpp b/tests/iotests.cpp index d31e9b7..79974c6 100644 --- a/tests/iotests.cpp +++ b/tests/iotests.cpp @@ -125,11 +125,10 @@ void IoTests::testBinaryReader() CPPUNIT_ASSERT_EQUAL(true, reader.readBool()); CPPUNIT_ASSERT_EQUAL("abc"s, reader.readString(3)); CPPUNIT_ASSERT_EQUAL(reader.readLengthPrefixedString(), "ABC"s); - CPPUNIT_ASSERT_EQUAL( - "01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901" - "23456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123" - "45678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345" - "678901234567890123456789"s, + CPPUNIT_ASSERT_EQUAL("01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901" + "23456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123" + "45678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345" + "678901234567890123456789"s, reader.readLengthPrefixedString()); CPPUNIT_ASSERT_EQUAL("def"s, reader.readTerminatedString()); testFile.seekg(-4, ios_base::cur);