Apply clang-format
This commit is contained in:
parent
a383d7dac5
commit
4e3393ee72
|
@ -249,7 +249,7 @@ template <typename StringType> bool endsWith(const StringType &str, const String
|
||||||
if (str.size() < phrase.size()) {
|
if (str.size() < phrase.size()) {
|
||||||
return false;
|
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) {
|
if (*stri != *phrasei) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -266,7 +266,7 @@ template <typename StringType> bool endsWith(const StringType &str, const typena
|
||||||
if (str.size() < phraseSize) {
|
if (str.size() < phraseSize) {
|
||||||
return false;
|
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) {
|
if (*stri != *phrase) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,11 +125,10 @@ void IoTests::testBinaryReader()
|
||||||
CPPUNIT_ASSERT_EQUAL(true, reader.readBool());
|
CPPUNIT_ASSERT_EQUAL(true, reader.readBool());
|
||||||
CPPUNIT_ASSERT_EQUAL("abc"s, reader.readString(3));
|
CPPUNIT_ASSERT_EQUAL("abc"s, reader.readString(3));
|
||||||
CPPUNIT_ASSERT_EQUAL(reader.readLengthPrefixedString(), "ABC"s);
|
CPPUNIT_ASSERT_EQUAL(reader.readLengthPrefixedString(), "ABC"s);
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL("01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901"
|
||||||
"01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901"
|
"23456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123"
|
||||||
"23456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123"
|
"45678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345"
|
||||||
"45678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345"
|
"678901234567890123456789"s,
|
||||||
"678901234567890123456789"s,
|
|
||||||
reader.readLengthPrefixedString());
|
reader.readLengthPrefixedString());
|
||||||
CPPUNIT_ASSERT_EQUAL("def"s, reader.readTerminatedString());
|
CPPUNIT_ASSERT_EQUAL("def"s, reader.readTerminatedString());
|
||||||
testFile.seekg(-4, ios_base::cur);
|
testFile.seekg(-4, ios_base::cur);
|
||||||
|
|
Loading…
Reference in New Issue