diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-11-11 08:04:02 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-11-11 10:01:39 +0100 |
commit | 1ef0261539ca6ee8ad9f43d91536c9caa4f7ea53 (patch) | |
tree | cbbd26a27356c7d0ee2019694eab99017173c0c1 /sal/qa/rtl | |
parent | 2875c65946e59f5dd7968155463bf00bd71d440b (diff) |
Drop the OUString vs. OUStringLiteral comparison operator overloads
...which can be subsumed by their OUString vs. OUString counterparts now that
conversion from OUStringLiteral to OUString is cheap since
e6dfaf9f44f9939abc338c83b3024108431d0f69 "Turn OUStringLiteral into a
consteval'ed, static-refcound rtl_uString". (The only place that needed
adaption was the dubious use of temporary OUStringLiteral instances in
sal/qa/rtl/strings/test_oustring_stringliterals.cxx, which now caused "error:
conversion function from 'rtlunittest::OUStringLiteral<6>' to
'const rtlunittest::OUString' invokes a deleted function".)
Change-Id: I4f0f96efa2d5331ed5cbc9a29bdfdf3c0f4148a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125020
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal/qa/rtl')
-rw-r--r-- | sal/qa/rtl/strings/test_oustring_stringliterals.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx index 24867050fb7f..9227cac84e7e 100644 --- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx +++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx @@ -213,10 +213,12 @@ void test::oustring::StringLiterals::checkOUStringLiteral() CPPUNIT_ASSERT( s1.endsWithIgnoreAsciiCase(rtlunittest::OUStringLiteral(u"EFDE"), &s2)); CPPUNIT_ASSERT_EQUAL(rtl::OUString("d"), s2); - CPPUNIT_ASSERT(bool(s1 == rtlunittest::OUStringLiteral(u"defde"))); - CPPUNIT_ASSERT(bool(rtlunittest::OUStringLiteral(u"defde") == s1)); - CPPUNIT_ASSERT(s1 != rtlunittest::OUStringLiteral(u"abc")); - CPPUNIT_ASSERT(rtlunittest::OUStringLiteral(u"abc") != s1); + static constexpr rtlunittest::OUStringLiteral defde(u"defde"); + CPPUNIT_ASSERT(bool(s1 == defde)); + CPPUNIT_ASSERT(bool(defde == s1)); + static constexpr rtlunittest::OUStringLiteral abc(u"abc"); + CPPUNIT_ASSERT(s1 != abc); + CPPUNIT_ASSERT(abc != s1); CPPUNIT_ASSERT_EQUAL( sal_Int32(3), s1.indexOf(rtlunittest::OUStringLiteral(u"de"), 1)); CPPUNIT_ASSERT_EQUAL( |