summaryrefslogtreecommitdiff
path: root/sc/source/core/data/cellvalue.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-11-02 18:46:45 +0100
committerEike Rathke <erack@redhat.com>2015-11-02 18:48:30 +0100
commit92a5be6b5364ad7a68d1d52796b3ca81d09cd306 (patch)
tree49089c055851d88fac1b303c9c2965cb0efe89b5 /sc/source/core/data/cellvalue.cxx
parent708bcf9055b04a82943e597747c0d74894714a9e (diff)
implement ScRefCellValue::operator=() without temporary and swap
... just ... why ... was ... that ... ? ... Change-Id: I1bc1ea12600859872c6d238b1ef6fc55f6ff2e04
Diffstat (limited to 'sc/source/core/data/cellvalue.cxx')
-rw-r--r--sc/source/core/data/cellvalue.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/cellvalue.cxx b/sc/source/core/data/cellvalue.cxx
index a1fcfbb4d1ba..c63f49305f22 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;
}