[Libreoffice-commits] core.git: sc/source

Eike Rathke erack at redhat.com
Mon Nov 2 09:52:06 PST 2015


 sc/source/core/data/cellvalue.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 92a5be6b5364ad7a68d1d52796b3ca81d09cd306
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Nov 2 18:46:45 2015 +0100

    implement ScRefCellValue::operator=() without temporary and swap
    
    ... just ... why ... was ... that ... ? ...
    
    Change-Id: I1bc1ea12600859872c6d238b1ef6fc55f6ff2e04

diff --git a/sc/source/core/data/cellvalue.cxx b/sc/source/core/data/cellvalue.cxx
index a1fcfbb..c63f493 100644
--- a/sc/source/core/data/cellvalue.cxx
+++ b/sc/source/core/data/cellvalue.cxx
@@ -594,8 +594,8 @@ bool ScRefCellValue::equalsWithoutFormat( const ScRefCellValue& r ) const
 
 ScRefCellValue& ScRefCellValue::operator= ( const ScRefCellValue& r )
 {
-    ScRefCellValue aTmp(r);
-    swap(aTmp);
+    meType = r.meType;
+    mfValue = r.mfValue;    // largest member of union
     return *this;
 }
 


More information about the Libreoffice-commits mailing list