[Libreoffice-commits] core.git: include/rtl

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 26 07:25:16 UTC 2020


 include/rtl/ustring.hxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 0f00c7f42403ad037a5c64adf777be7da87732f1
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Aug 26 07:15:13 2020 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Aug 26 09:24:39 2020 +0200

    Missing 'const'
    
    Apparently typos in 0c8fa58a2d73702770687ed15b98822d09f96ac3 "Support
    ConstCharArrayDetector also for UTF-16 arrays" that went unnoticed as for a
    const OUString s,
    
      s == u"..."
    
    could still pick the
    
      bool operator ==(OUString const &, sal_Unicode const *)
    
    overload.
    
    Change-Id: I61344ef2912fffca3cccf375e2e4c2be9beca604
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101377
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index 5f0c1032c603..d86602e9f2e3 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -1827,7 +1827,7 @@ public:
 #if defined LIBO_INTERNAL_ONLY
     /** @overload @since LibreOffice 5.3 */
     template<typename T> friend typename libreoffice_internal::ConstCharArrayDetector<T, bool>::TypeUtf16
-    operator ==(OUString & string, T & literal) {
+    operator ==(OUString const & string, T & literal) {
         return
             rtl_ustr_reverseCompare_WithLength(
                 string.pData->buffer, string.pData->length,
@@ -1838,7 +1838,7 @@ public:
     }
     /** @overload @since LibreOffice 5.3 */
     template<typename T> friend typename libreoffice_internal::ConstCharArrayDetector<T, bool>::TypeUtf16
-    operator ==(T & literal, OUString & string) {
+    operator ==(T & literal, OUString const & string) {
         return
             rtl_ustr_reverseCompare_WithLength(
                 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(
@@ -1849,7 +1849,7 @@ public:
     }
     /** @overload @since LibreOffice 5.3 */
     template<typename T> friend typename libreoffice_internal::ConstCharArrayDetector<T, bool>::TypeUtf16
-    operator !=(OUString & string, T & literal) {
+    operator !=(OUString const & string, T & literal) {
         return
             rtl_ustr_reverseCompare_WithLength(
                 string.pData->buffer, string.pData->length,
@@ -1860,7 +1860,7 @@ public:
     }
     /** @overload @since LibreOffice 5.3 */
     template<typename T> friend typename libreoffice_internal::ConstCharArrayDetector<T, bool>::TypeUtf16
-    operator !=(T & literal, OUString & string) {
+    operator !=(T & literal, OUString const & string) {
         return
             rtl_ustr_reverseCompare_WithLength(
                 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(


More information about the Libreoffice-commits mailing list