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 /include | |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/rtl/ustrbuf.hxx | 16 |
1 files changed, 16 insertions, 0 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 |