summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-11-15 15:56:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-15 20:58:51 +0100
commitfe65c692cfbf128d55c75207f6d1452713fd72f6 (patch)
tree7f0eadb10b9934bd5a17657009ef8205f2b330bb
parente84592e551d27d5f09e2db26b1495ba2e4069c96 (diff)
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.grandin@collabora.co.uk>
-rw-r--r--include/rtl/ustring.hxx4
1 files changed, 2 insertions, 2 deletions
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