diff options
-rw-r--r-- | connectivity/source/drivers/ado/Awrapado.cxx | 9 | ||||
-rw-r--r-- | connectivity/source/drivers/dbase/dindexnode.cxx | 11 | ||||
-rw-r--r-- | include/vcl/ppdparser.hxx | 2 | ||||
-rw-r--r-- | lotuswordpro/inc/xfilter/xfliststyle.hxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfliststyle.cxx | 21 | ||||
-rw-r--r-- | sc/source/core/tool/scmatrix.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/html/htmlpars.cxx | 7 | ||||
-rw-r--r-- | sw/source/core/layout/pagedesc.cxx | 3 | ||||
-rw-r--r-- | vcl/opengl/texture.cxx | 12 | ||||
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 7 |
10 files changed, 10 insertions, 72 deletions
diff --git a/connectivity/source/drivers/ado/Awrapado.cxx b/connectivity/source/drivers/ado/Awrapado.cxx index 1344fed82a66..1fc664f89a5a 100644 --- a/connectivity/source/drivers/ado/Awrapado.cxx +++ b/connectivity/source/drivers/ado/Awrapado.cxx @@ -1549,14 +1549,7 @@ WpBase::WpBase(const WpBase& aWrapper) //inline WpBase& WpBase::operator=(const WpBase& rhs) { - if (rhs.pIUnknown != pIUnknown) - { - if (pIUnknown) - pIUnknown->Release(); - pIUnknown = rhs.pIUnknown; - if (pIUnknown) - pIUnknown->AddRef(); - } + operator=(rhs.pIUnknown); return *this; }; diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index 3278f195a369..8b4fd49fb54d 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -850,15 +850,8 @@ void ONDXPagePtr::Clear() ONDXPagePtr& ONDXPagePtr::operator=(ONDXPagePtr const & rOther) { - if (rOther.mpPage != nullptr) { - rOther.mpPage->AddNextRef(); - } - ONDXPage * pOldObj = mpPage; - mpPage = rOther.mpPage; - nPagePos = rOther.nPagePos; - if (pOldObj != nullptr) { - pOldObj->ReleaseRef(); - } + ONDXPagePtr aTemp(rOther); + *this = std::move(aTemp); return *this; } diff --git a/include/vcl/ppdparser.hxx b/include/vcl/ppdparser.hxx index 19ff9cd7cb76..71a17dcc70f5 100644 --- a/include/vcl/ppdparser.hxx +++ b/include/vcl/ppdparser.hxx @@ -237,7 +237,7 @@ class VCL_DLLPUBLIC PPDContext public: PPDContext(); PPDContext( const PPDContext& rContext ) { operator=( rContext ); } - PPDContext& operator=( const PPDContext& rContext ); + PPDContext& operator=( const PPDContext& rContext ) = default; PPDContext& operator=( PPDContext&& rContext ); void setParser( const PPDParser* ); diff --git a/lotuswordpro/inc/xfilter/xfliststyle.hxx b/lotuswordpro/inc/xfilter/xfliststyle.hxx index f4abb93a5b10..3cde9644a612 100644 --- a/lotuswordpro/inc/xfilter/xfliststyle.hxx +++ b/lotuswordpro/inc/xfilter/xfliststyle.hxx @@ -190,7 +190,7 @@ public: XFListStyle(const XFListStyle& other); - XFListStyle& operator=(const XFListStyle& other); + XFListStyle& operator=(const XFListStyle& other) = delete; virtual ~XFListStyle() override; diff --git a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx index 85db3c77a973..5205020784d4 100644 --- a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx @@ -185,27 +185,6 @@ XFListStyle::XFListStyle(const XFListStyle& other):XFStyle(other) } } -XFListStyle& XFListStyle::operator=(const XFListStyle& other) -{ - for( int i=0; i<10; i++ ) - { - const enumXFListLevel type = other.m_pListLevels[i]->m_eListType; - if( type == enumXFListLevelNumber ) - { - XFListlevelNumber *pNum = static_cast<XFListlevelNumber*>(m_pListLevels[i].get()); - m_pListLevels[i].reset(new XFListlevelNumber(*pNum)); - } - else if( type == enumXFListLevelBullet ) - { - XFListLevelBullet *pBullet = static_cast<XFListLevelBullet*>(m_pListLevels[i].get()); - m_pListLevels[i].reset(new XFListLevelBullet(*pBullet)); - } - else - m_pListLevels[i].reset(); - } - return *this; -} - XFListStyle::~XFListStyle() { } diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx index 97822e9909ed..0291c84a04d7 100644 --- a/sc/source/core/tool/scmatrix.cxx +++ b/sc/source/core/tool/scmatrix.cxx @@ -2363,13 +2363,7 @@ public: MatrixOpWrapper( const MatrixOpWrapper& r ) : mrMat(r.mrMat), pos(r.pos), mpOp(r.mpOp) {} - MatrixOpWrapper& operator= ( const MatrixOpWrapper& r ) - { - mrMat = r.mrMat; - pos = r.pos; - mpOp = r.mpOp; - return *this; - } + MatrixOpWrapper& operator= ( const MatrixOpWrapper& r ) = default; void operator()(const MatrixImplType::element_block_node_type& node) { diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index bfd2241760b5..c5a95c636e62 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -3005,12 +3005,7 @@ class CSSHandler MemStr() : mp(nullptr), mn(0) {} MemStr(const char* p, size_t n) : mp(p), mn(n) {} - MemStr& operator=(const MemStr& r) - { - mp = r.mp; - mn = r.mn; - return *this; - } + MemStr& operator=(const MemStr& r) = default; }; MemStr maPropName; /// current property name. diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx index 49933eb472fe..2e3a122655e6 100644 --- a/sw/source/core/layout/pagedesc.cxx +++ b/sw/source/core/layout/pagedesc.cxx @@ -515,8 +515,7 @@ SwPageDescExt & SwPageDescExt::operator = (const SwPageDesc & rSrc) SwPageDescExt & SwPageDescExt::operator = (const SwPageDescExt & rSrc) { - SetPageDesc(rSrc.m_PageDesc); - + operator=(rSrc.m_PageDesc); return *this; } diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx index 2862cce52352..6536141c8134 100644 --- a/vcl/opengl/texture.cxx +++ b/vcl/opengl/texture.cxx @@ -561,16 +561,8 @@ OpenGLTexture::operator bool() const OpenGLTexture& OpenGLTexture::operator=(const OpenGLTexture& rTexture) { - if (rTexture.mpImpl) - rTexture.mpImpl->IncreaseRefCount(rTexture.mnSlotNumber); - - if (mpImpl) - mpImpl->DecreaseRefCount(mnSlotNumber); - - maRect = rTexture.maRect; - mpImpl = rTexture.mpImpl; - mnSlotNumber = rTexture.mnSlotNumber; - + OpenGLTexture aTemp(rTexture); + *this = std::move(aTemp); return *this; } diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index aa99e3638580..d5b9e7152ffe 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -1637,13 +1637,6 @@ PPDContext::PPDContext() : { } -PPDContext& PPDContext::operator=( const PPDContext& rCopy ) -{ - m_pParser = rCopy.m_pParser; - m_aCurrentValues = rCopy.m_aCurrentValues; - return *this; -} - PPDContext& PPDContext::operator=( PPDContext&& rCopy ) { std::swap(m_pParser, rCopy.m_pParser); |