diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-04-09 16:43:39 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-04-10 12:18:24 +0200 |
commit | adfba503c792fdbd4748d6680c2dd8d8d5bb0d69 (patch) | |
tree | 88fe08b0bd11b07641022f8aae90b3a3106021e8 /vcl | |
parent | 835ddd98d72617c2ed6ae6950f1fec0cc21b3ba2 (diff) |
clang-tidy: Silence warnings from WIP unhandled-self-assignment check
Where it can be done by removing useless / duplicate code.
For XFListStyle I removed the copy operator entirely, because it
was bugous and it seems not to be used anyway.
Change-Id: Iba0eb0d5c45b42f0e78be466c617acdc1216eb22
Reviewed-on: https://gerrit.libreoffice.org/70482
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/opengl/texture.cxx | 12 | ||||
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 7 |
2 files changed, 2 insertions, 17 deletions
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); |