diff options
author | Noel Grandin <noel@peralex.com> | 2021-11-21 16:50:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-22 12:19:59 +0100 |
commit | a70bd820da49401e7c233ae254ce954954344d33 (patch) | |
tree | 0a3b37e0b70839e71375ede972831db3e9bfb284 | |
parent | 8e34fe50412fd58a600ba1b8238b80444aec02e5 (diff) |
tdf#133835 speedup calc autofilter (8)
Add move operator to OUStringBuffer to avoid copy
Change-Id: Ifef326449d87aac79f4b1142db7a53faad427580
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125626
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | include/rtl/ustrbuf.hxx | 16 | ||||
-rw-r--r-- | tools/source/fsys/urlobj.cxx | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx index 20afe57de7ff..115d529a0c53 100644 --- a/include/rtl/ustrbuf.hxx +++ b/include/rtl/ustrbuf.hxx @@ -266,6 +266,22 @@ public: return *this; } +#if defined LIBO_INTERNAL_ONLY + /** Move assignment + * @since LibreOffice 7.3 + */ + OUStringBuffer& operator = ( OUStringBuffer&& value ) + { + rtl_uString_release( pData ); + pData = value.pData; + nCapacity = value.nCapacity; + value.pData = nullptr; + value.nCapacity = 0; + rtl_uString_new( &value.pData ); + return *this; + } +#endif + /** Assign from a string. @since LibreOffice 5.3 diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index d265111d2e2e..8babbf90b79f 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -1472,7 +1472,7 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef, return false; } - m_aAbsURIRef = aSynAbsURIRef; + m_aAbsURIRef = std::move(aSynAbsURIRef); return true; } |