diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-06 13:10:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-06 20:23:09 +0200 |
commit | 8c77b5670ec0ee6d550d5adba51b8ae76fe2c162 (patch) | |
tree | 9a905004341f2fae7bee3b45bd8826d95f801353 /sal | |
parent | 1dea7fb6be5f1ba64f680e3ad885afa1c99030bf (diff) |
use OString::operator== in preference to ::equals
Change-Id: Ib291521963a791a9c6175964571e9d9895072acf
Reviewed-on: https://gerrit.libreoffice.org/39646
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/qa/OStringBuffer/rtl_OStringBuffer.cxx | 4 | ||||
-rw-r--r-- | sal/qa/osl/file/osl_File.cxx | 4 | ||||
-rw-r--r-- | sal/qa/rtl/digest/rtl_digest.cxx | 4 | ||||
-rw-r--r-- | sal/qa/rtl/strings/test_oustring_convert.cxx | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx index 6e33ea5b2b70..fdaf8f9349ca 100644 --- a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx +++ b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx @@ -73,7 +73,7 @@ namespace rtl_OStringBuffer sal_Int32 nLenStrBuftmp = aStrBuftmp.getLength(); rtl::OString sStr(aStrBuftmp.getStr()); - bool res = aStrtmp.equals( sStr ); + bool res = aStrtmp == sStr; CPPUNIT_ASSERT_EQUAL_MESSAGE ( @@ -14248,7 +14248,7 @@ namespace rtl_OStringBuffer aStrBuf.append( input ); - bool bRes = expVal.equals( aStrBuf.getStr() ); + bool bRes = expVal == aStrBuf.getStr(); CPPUNIT_ASSERT_MESSAGE ( "input Int64 -9223372036854775808 and return OStringBuffer[0]+(-9223372036854775808)", diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 68df587690da..4a52bc8a7df9 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -365,7 +365,7 @@ inline bool checkDirectory(const OUString& str, oslCheckMode nCheckMode) inline OString outputError(const OString & returnVal, const OString & rightVal, const sal_Char * msg = "") { OString aString; - if (returnVal.equals(rightVal)) + if (returnVal == rightVal) return aString; aString += msg; @@ -707,7 +707,7 @@ namespace osl_FileBase if (!_sAssumeResultStr.isEmpty()) { - bool bStrAreEqual = _sAssumeResultStr.equals(sStr); + bool bStrAreEqual = _sAssumeResultStr == sStr; CPPUNIT_ASSERT_EQUAL_MESSAGE("Assumption is wrong", _nAssumeError, nError); CPPUNIT_ASSERT_MESSAGE("Assumption is wrong", diff --git a/sal/qa/rtl/digest/rtl_digest.cxx b/sal/qa/rtl/digest/rtl_digest.cxx index f5c088b6c3ad..6b693067785f 100644 --- a/sal/qa/rtl/digest/rtl_digest.cxx +++ b/sal/qa/rtl/digest/rtl_digest.cxx @@ -199,7 +199,7 @@ public: OString aSum2 = getDigest(aMsg2, rtl_Digest_AlgorithmMD5); CPPUNIT_ASSERT_MESSAGE("md5sum must have a length", aSum1.getLength() == 32 && aSum2.getLength() == 32 ); - CPPUNIT_ASSERT_MESSAGE("source is the same, dest must be also the same", aSum1.equals(aSum2)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("source is the same, dest must be also the same", aSum1, aSum2); } { @@ -210,7 +210,7 @@ public: OString aSum2 = getDigest(aMsg2, rtl_Digest_AlgorithmMD5); CPPUNIT_ASSERT_MESSAGE("md5sum must have a length", aSum1.getLength() == 32 && aSum2.getLength() == 32 ); - CPPUNIT_ASSERT_MESSAGE("differ only in one char", !aSum1.equals(aSum2)); + CPPUNIT_ASSERT_MESSAGE("differ only in one char", aSum1 != aSum2); } } diff --git a/sal/qa/rtl/strings/test_oustring_convert.cxx b/sal/qa/rtl/strings/test_oustring_convert.cxx index f92ce9378301..de3902ef7f8c 100644 --- a/sal/qa/rtl/strings/test_oustring_convert.cxx +++ b/sal/qa/rtl/strings/test_oustring_convert.cxx @@ -79,7 +79,7 @@ void testConvertToString(TestConvertToString const & rTest) if (bSuccess) { - if (rTest.pStrict == nullptr || !aStrict.equals(rTest.pStrict)) + if (rTest.pStrict == nullptr || aStrict != rTest.pStrict) { rtl::OStringBuffer aMessage(aPrefix); aMessage.append("strict = \""); @@ -90,7 +90,7 @@ void testConvertToString(TestConvertToString const & rTest) } else { - if (!aStrict.equals(rtl::OString(RTL_CONSTASCII_STRINGPARAM("12345")))) + if (aStrict != rtl::OString(RTL_CONSTASCII_STRINGPARAM("12345"))) { rtl::OStringBuffer aMessage(aPrefix); aMessage.append("modified output"); @@ -103,7 +103,7 @@ void testConvertToString(TestConvertToString const & rTest) CPPUNIT_ASSERT_MESSAGE(aMessage.getStr(), false); } } - if (!aRelaxed.equals(rTest.pRelaxed)) + if (aRelaxed != rTest.pRelaxed) { rtl::OStringBuffer aMessage(aPrefix); aMessage.append("relaxed = \""); |