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

New commits:
commit fe65c692cfbf128d55c75207f6d1452713fd72f6
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Nov 15 15:56:05 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Nov 15 20:58:51 2021 +0100

    OUStringConstExpr should convert to 'const OUString&'
    
    to avoid creating unnecessary temporaries
    
    Change-Id: I222789a4ffba67eaf7e297ecb2a91c3da95f5499
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125249
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index 6cf92e1d3599..e5b58be8c52d 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -161,7 +161,7 @@ public:
     // no destructor necessary because we know we are pointing at a 
compile-time
     // constant OUStringLiteral, which bypasses ref-counting.
 
-    inline operator OUString() const;
+    inline operator const OUString&() const;
 
 private:
     rtl_uString* pData;
@@ -3299,7 +3299,7 @@ private:
 
 #if defined LIBO_INTERNAL_ONLY
 // Can only define this after we define OUString
-inline OUStringConstExpr::operator OUString() const { return 
OUString::unacquired(&pData); }
+inline OUStringConstExpr::operator const OUString &() const { return 
OUString::unacquired(&pData); }
 #endif
 
 #if defined LIBO_INTERNAL_ONLY

Reply via email to