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

New commits:
commit af826c85c2eb519b9a3f76099c0e70604d9679e2
Author:     Noel Grandin <[email protected]>
AuthorDate: Mon Nov 28 15:56:52 2022 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Mon Nov 28 19:17:41 2022 +0100

    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 <[email protected]>

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

Reply via email to