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

Michael Stahl mstahl at redhat.com
Tue Jun 14 14:17:41 UTC 2016


 include/rtl/string.hxx  |    4 ++--
 include/rtl/ustring.hxx |   20 ++++++++++----------
 2 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 5f5b740761a8a38b48de523f7a03dcd24c166e37
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Jun 14 15:53:59 2016 +0200

    sal: rename O[U]String parameter
    
    Callgrind tinderbox complains that "string" shadows some global, so
    let's try "rString" instead.
    
    Change-Id: I3973f23ef6e8ebf861d66012fede84cb8a685be8

diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index 5507e97..827ab8e 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -1892,9 +1892,9 @@ struct CStringHash
  */
 template< typename charT, typename traits > std::basic_ostream<charT, traits> &
 operator <<(
-    std::basic_ostream<charT, traits> & stream, OString const & string)
+    std::basic_ostream<charT, traits> & stream, OString const & rString)
 {
-    return stream << string.getStr();
+    return stream << rString.getStr();
         // best effort; potentially loses data due to embedded null characters
 }
 
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index 6df2227..8ac9882 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -1381,11 +1381,11 @@ public:
      * @since LibreOffice 3.6
      */
     template< typename T >
-    friend inline typename libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator==( const OUString& string, T& literal )
+    friend inline typename libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator==( const OUString& rString, T& literal )
     {
         assert(
             libreoffice_internal::ConstCharArrayDetector<T>::isValid(literal));
-        return string.equalsAsciiL(
+        return rString.equalsAsciiL(
             libreoffice_internal::ConstCharArrayDetector<T>::toPointer(literal),
             libreoffice_internal::ConstCharArrayDetector<T>::length);
     }
@@ -1397,11 +1397,11 @@ public:
      * @since LibreOffice 3.6
      */
     template< typename T >
-    friend inline typename libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator==( T& literal, const OUString& string )
+    friend inline typename libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator==( T& literal, const OUString& rString )
     {
         assert(
             libreoffice_internal::ConstCharArrayDetector<T>::isValid(literal));
-        return string.equalsAsciiL(
+        return rString.equalsAsciiL(
             libreoffice_internal::ConstCharArrayDetector<T>::toPointer(literal),
             libreoffice_internal::ConstCharArrayDetector<T>::length);
     }
@@ -1413,11 +1413,11 @@ public:
      * @since LibreOffice 3.6
      */
     template< typename T >
-    friend inline typename libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator!=( const OUString& string, T& literal )
+    friend inline typename libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator!=( const OUString& rString, T& literal )
     {
         assert(
             libreoffice_internal::ConstCharArrayDetector<T>::isValid(literal));
-        return !string.equalsAsciiL(
+        return !rString.equalsAsciiL(
             libreoffice_internal::ConstCharArrayDetector<T>::toPointer(literal),
             libreoffice_internal::ConstCharArrayDetector<T>::length);
     }
@@ -1429,11 +1429,11 @@ public:
      * @since LibreOffice 3.6
      */
     template< typename T >
-    friend inline typename libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator!=( T& literal, const OUString& string )
+    friend inline typename libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator!=( T& literal, const OUString& rString )
     {
         assert(
             libreoffice_internal::ConstCharArrayDetector<T>::isValid(literal));
-        return !string.equalsAsciiL(
+        return !rString.equalsAsciiL(
             libreoffice_internal::ConstCharArrayDetector<T>::toPointer(literal),
             libreoffice_internal::ConstCharArrayDetector<T>::length);
     }
@@ -2828,10 +2828,10 @@ inline OString OUStringToOString( const OUString & rUnicode,
 */
 template< typename charT, typename traits >
 inline std::basic_ostream<charT, traits> & operator <<(
-    std::basic_ostream<charT, traits> & stream, OUString const & string)
+    std::basic_ostream<charT, traits> & stream, OUString const & rString)
 {
     return stream <<
-        OUStringToOString(string, RTL_TEXTENCODING_UTF8).getStr();
+        OUStringToOString(rString, RTL_TEXTENCODING_UTF8).getStr();
         // best effort; potentially loses data due to conversion failures
         // (stray surrogate halves) and embedded null characters
 }


More information about the Libreoffice-commits mailing list