diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-04-09 16:44:34 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-04-10 01:06:19 +0200 |
commit | 3a5d78365dd172881c16c03e67f2d170ffc6d7d4 (patch) | |
tree | 55142243eef76b984f1be86f729e19c4327bf4f5 /vcl/source/window | |
parent | 8e9de1ad055d1d8f41a6cf6d8cea245463f61d40 (diff) |
clang-tidy: Fix suspicious catches of WIP unhandled-self-assignment check
Change-Id: I1cb16b180f4cc5bf4d65485f03c44a06414d3580
Reviewed-on: https://gerrit.libreoffice.org/70481
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/accel.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx index 3a5e31baf8d2..0b16a053730f 100644 --- a/vcl/source/window/accel.cxx +++ b/vcl/source/window/accel.cxx @@ -281,6 +281,8 @@ Accelerator* Accelerator::GetAccel( sal_uInt16 nItemId ) const Accelerator& Accelerator::operator=( const Accelerator& rAccel ) { + if(this == &rAccel) + return *this; // assign new data maCurKeyCode = vcl::KeyCode(); diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 9d7c5cc9e3d2..516d5930d183 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -1166,6 +1166,9 @@ OString Menu::GetHelpId( sal_uInt16 nItemId ) const Menu& Menu::operator=( const Menu& rMenu ) { + if(this == &rMenu) + return *this; + // clean up Clear(); |