summaryrefslogtreecommitdiffstats
path: root/include/rtl/ustring.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-11-11 08:04:02 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-11-11 10:01:39 +0100
commit1ef0261539ca6ee8ad9f43d91536c9caa4f7ea53 (patch)
treecbbd26a27356c7d0ee2019694eab99017173c0c1 /include/rtl/ustring.hxx
parentsw, out of order undo: allow a subset of a non-empty redo list (diff)
downloadcore-1ef0261539ca6ee8ad9f43d91536c9caa4f7ea53.tar.gz
core-1ef0261539ca6ee8ad9f43d91536c9caa4f7ea53.zip
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 'include/rtl/ustring.hxx')
-rw-r--r--include/rtl/ustring.hxx107
1 files changed, 0 insertions, 107 deletions
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index 9a893d3764af..1a5ff2d97d6c 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -1845,113 +1845,6 @@ public:
}
#endif
-#if defined LIBO_INTERNAL_ONLY
- /// @cond INTERNAL
-
- /* Comparison between OUString and OUStringLiteral.
-
- @since LibreOffice 5.0
- */
-
- template<std::size_t N>
- friend bool operator ==(OUString const & lhs, OUStringLiteral<N> const & rhs) {
- return
- rtl_ustr_reverseCompare_WithLength(
- lhs.pData->buffer, lhs.pData->length, rhs.getStr(), rhs.getLength())
- == 0;
- }
-
- template<std::size_t N>
- friend bool operator !=(OUString const & lhs, OUStringLiteral<N> const & rhs) {
- return
- rtl_ustr_reverseCompare_WithLength(
- lhs.pData->buffer, lhs.pData->length, rhs.getStr(), rhs.getLength())
- != 0;
- }
-
- template<std::size_t N>
- friend bool operator <(OUString const & lhs, OUStringLiteral<N> const & rhs) {
- return
- (rtl_ustr_compare_WithLength(
- lhs.pData->buffer, lhs.pData->length, rhs.getStr(), rhs.getLength()))
- < 0;
- }
-
- template<std::size_t N>
- friend bool operator <=(OUString const & lhs, OUStringLiteral<N> const & rhs) {
- return
- (rtl_ustr_compare_WithLength(
- lhs.pData->buffer, lhs.pData->length, rhs.getStr(), rhs.getLength()))
- <= 0;
- }
-
- template<std::size_t N>
- friend bool operator >(OUString const & lhs, OUStringLiteral<N> const & rhs) {
- return
- (rtl_ustr_compare_WithLength(
- lhs.pData->buffer, lhs.pData->length, rhs.getStr(), rhs.getLength()))
- > 0;
- }
-
- template<std::size_t N>
- friend bool operator >=(OUString const & lhs, OUStringLiteral<N> const & rhs) {
- return
- (rtl_ustr_compare_WithLength(
- lhs.pData->buffer, lhs.pData->length, rhs.getStr(), rhs.getLength()))
- >= 0;
- }
-
- template<std::size_t N>
- friend bool operator ==(OUStringLiteral<N> const & lhs, OUString const & rhs) {
- return
- rtl_ustr_reverseCompare_WithLength(
- lhs.getStr(), lhs.getLength(), rhs.pData->buffer, rhs.pData->length)
- == 0;
- }
-
- template<std::size_t N>
- friend bool operator !=(OUStringLiteral<N> const & lhs, OUString const & rhs) {
- return
- rtl_ustr_reverseCompare_WithLength(
- lhs.getStr(), lhs.getLength(), rhs.pData->buffer, rhs.pData->length)
- != 0;
- }
-
- template<std::size_t N>
- friend bool operator <(OUStringLiteral<N> const & lhs, OUString const & rhs) {
- return
- (rtl_ustr_compare_WithLength(
- lhs.getStr(), lhs.getLength(), rhs.pData->buffer, rhs.pData->length))
- < 0;
- }
-
- template<std::size_t N>
- friend bool operator <=(OUStringLiteral<N> const & lhs, OUString const & rhs) {
- return
- (rtl_ustr_compare_WithLength(
- lhs.getStr(), lhs.getLength(), rhs.pData->buffer, rhs.pData->length))
- <= 0;
- }
-
- template<std::size_t N>
- friend bool operator >(OUStringLiteral<N> const & lhs, OUString const & rhs) {
- return
- (rtl_ustr_compare_WithLength(
- lhs.getStr(), lhs.getLength(), rhs.pData->buffer, rhs.pData->length))
- > 0;
- }
-
- template<std::size_t N>
- friend bool operator >=(OUStringLiteral<N> const & lhs, OUString const & rhs) {
- return
- (rtl_ustr_compare_WithLength(
- lhs.getStr(), lhs.getLength(), rhs.pData->buffer, rhs.pData->length))
- >= 0;
- }
-
- /// @endcond
-#endif
-
/**
Returns a hashcode for this string.