[Libreoffice-commits] core.git: sc/inc sc/source
Caolán McNamara
caolanm at redhat.com
Tue Oct 4 16:08:55 UTC 2016
sc/inc/cellvalue.hxx | 5 -----
sc/source/core/data/cellvalue.cxx | 20 --------------------
2 files changed, 25 deletions(-)
New commits:
commit 33e8582c0f34ce30e4a29228548438dc53aa8711
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 4 13:11:13 2016 +0100
coverity#1371197 the compiler defaults should be sufficient here
Change-Id: I4230d03dc58027f958d8943c0ff90f00508f7386
Reviewed-on: https://gerrit.libreoffice.org/29523
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/inc/cellvalue.hxx b/sc/inc/cellvalue.hxx
index ca7dc2e..4ebd298 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 25ed7d70..147ad51 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: */
More information about the Libreoffice-commits
mailing list