diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-02-03 16:21:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-02-03 20:27:29 +0100 |
commit | b66c5f77d150056b2de262dae66301fcd7dc38c1 (patch) | |
tree | be6cb75524abff6f1fbfda2c62fd2ce5cb132e2f /vcl | |
parent | 86af52b119eaf57b7c1f8943cc1c6631f2044482 (diff) |
loplugin:unsignedcompare (clang-cl)
Change-Id: I69cc1b352221ca053ccd0c5b78e926480a8c9ccd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87884
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/win/window/salmenu.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/win/window/salmenu.cxx b/vcl/win/window/salmenu.cxx index 3e90600c6670..6f8dc8bff283 100644 --- a/vcl/win/window/salmenu.cxx +++ b/vcl/win/window/salmenu.cxx @@ -22,6 +22,7 @@ #include <vcl/menu.hxx> #include <vcl/sysdata.hxx> #include <o3tl/char16_t2wchar_t.hxx> +#include <o3tl/safeint.hxx> #include <win/wincomp.hxx> #include <win/saldata.hxx> @@ -175,7 +176,7 @@ void WinSalMenu::InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ) void WinSalMenu::RemoveItem( unsigned nPos ) { int num = ::GetMenuItemCount( mhMenu ); - if( num != -1 && nPos < static_cast<unsigned>(num) ) + if( num != -1 && nPos < o3tl::make_unsigned(num) ) { WinSalMenuItem *pSalMenuItem = nullptr; |