From 33e8582c0f34ce30e4a29228548438dc53aa8711 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 4 Oct 2016 13:11:13 +0100 Subject: coverity#1371197 the compiler defaults should be sufficient here MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I4230d03dc58027f958d8943c0ff90f00508f7386 Reviewed-on: https://gerrit.libreoffice.org/29523 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sc/inc/cellvalue.hxx | 5 ----- sc/source/core/data/cellvalue.cxx | 20 -------------------- 2 files changed, 25 deletions(-) diff --git a/sc/inc/cellvalue.hxx b/sc/inc/cellvalue.hxx index ca7dc2e1cc14..4ebd29889fee 100644 --- a/sc/inc/cellvalue.hxx +++ b/sc/inc/cellvalue.hxx @@ -110,15 +110,12 @@ struct SC_DLLPUBLIC ScRefCellValue ScRefCellValue( const svl::SharedString* pString ); ScRefCellValue( const EditTextObject* pEditText ); ScRefCellValue( ScFormulaCell* pFormula ); - ScRefCellValue( const ScRefCellValue& r ); /** * Take cell value from specified position in specified document. */ ScRefCellValue( ScDocument& rDoc, const ScAddress& rPos ); - ~ScRefCellValue(); - void clear(); /** @@ -153,8 +150,6 @@ struct SC_DLLPUBLIC ScRefCellValue bool hasEmptyValue(); bool equalsWithoutFormat( const ScRefCellValue& r ) const; - - ScRefCellValue& operator= ( const ScRefCellValue& r ); }; #endif diff --git a/sc/source/core/data/cellvalue.cxx b/sc/source/core/data/cellvalue.cxx index 25ed7d705726..147ad514f3fb 100644 --- a/sc/source/core/data/cellvalue.cxx +++ b/sc/source/core/data/cellvalue.cxx @@ -489,19 +489,11 @@ ScRefCellValue::ScRefCellValue( const svl::SharedString* pString ) : meType(CELL ScRefCellValue::ScRefCellValue( const EditTextObject* pEditText ) : meType(CELLTYPE_EDIT), mpEditText(pEditText) {} ScRefCellValue::ScRefCellValue( ScFormulaCell* pFormula ) : meType(CELLTYPE_FORMULA), mpFormula(pFormula) {} -// It should be enough to copy the double value, which is at least as large -// as the pointer values. -ScRefCellValue::ScRefCellValue( const ScRefCellValue& r ) : meType(r.meType), mfValue(r.mfValue) {} - ScRefCellValue::ScRefCellValue( ScDocument& rDoc, const ScAddress& rPos ) { assign( rDoc, rPos); } -ScRefCellValue::~ScRefCellValue() -{ -} - void ScRefCellValue::clear() { // Reset to empty value. @@ -589,16 +581,4 @@ bool ScRefCellValue::equalsWithoutFormat( const ScRefCellValue& r ) const return equalsWithoutFormatImpl(*this, r); } -ScRefCellValue& ScRefCellValue::operator= ( const ScRefCellValue& r ) -{ - // So we *could* have a copy-swap-idiom here for exception-safety if we had - // to slow down things.. but then implement an explicit move-ctor and pass - // r by-value instead of manually creating a temporary so the compiler can - // take advantage. And initialize - // ScRefCellValue(ScDocument&,const ScAddress&) with default ctor. - meType = r.meType; - mfValue = r.mfValue; // largest member of union - return *this; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit