diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-11-28 15:56:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-11-28 19:17:41 +0100 |
commit | af826c85c2eb519b9a3f76099c0e70604d9679e2 (patch) | |
tree | 9ec4d759b7a26667704d3b5c179c64bdd9b40872 | |
parent | ccd6a95eaaa8c8c4af1f2efa388a25aca2877cc1 (diff) |
tdf#133343 improve perf of OUString::operator=(&&)
shaves 4% off the save time here.
We don't need to do this - either the old rtl_uString will be
overwritten in the source object, or it will be destructed, either way,
re-initialising it is a waste of time.
Change-Id: I47becb17de1e47f2a26c2ac4497e769e13523115
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143403
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | include/rtl/ustring.hxx | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index 16ccecedd7a9..f8b5fb461d2f 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -577,8 +577,6 @@ public: OUString & operator=( OUString && str ) noexcept { std::swap(pData, str.pData); - // rtl_uString_new will release any existing data before assigning empty - rtl_uString_new( &str.pData ); return *this; } #endif |