[Libreoffice-commits] core.git: vcl/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Thu Nov 19 21:09:12 UTC 2020
vcl/source/control/imivctl.hxx | 2 +-
vcl/source/control/imivctl1.cxx | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 0c016af83ba42c3b368f7ffb7c58add19b6ec713
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Nov 19 16:56:23 2020 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Nov 19 22:08:31 2020 +0100
Make use of GRID_NOT_FOUND
...which had been unused ever since the code had been introduced with
aed8f7e44502be1eacfc179ceaede8a2118c462c "fix: #85201# new template dialog".
(And fix the resulting loplugin:cstylecast warning.)
Change-Id: I0f4fb1a630d7cd5f509d82067803284a133cfc8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106179
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/vcl/source/control/imivctl.hxx b/vcl/source/control/imivctl.hxx
index 9695e99a665d..35cba0ebced9 100644
--- a/vcl/source/control/imivctl.hxx
+++ b/vcl/source/control/imivctl.hxx
@@ -465,7 +465,7 @@ public:
typedef sal_uLong GridId;
-#define GRID_NOT_FOUND ((GridId)ULONG_MAX)
+#define GRID_NOT_FOUND (GridId(ULONG_MAX))
class IcnGridMap_Impl
{
diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx
index 24d64bdd7e41..8bcd8f912e1e 100644
--- a/vcl/source/control/imivctl1.cxx
+++ b/vcl/source/control/imivctl1.cxx
@@ -2731,7 +2731,7 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindEntryPredecessor( SvxIconCho
Point aNewPos( aCenterRect.Center() );
sal_uLong nGrid = GetPredecessorGrid( aNewPos );
size_t nCount = maEntries.size();
- if( nGrid == ULONG_MAX )
+ if( nGrid == GRID_NOT_FOUND )
return nullptr;
if( nGrid >= nCount )
nGrid = nCount - 1;
@@ -2764,7 +2764,7 @@ sal_uLong SvxIconChoiceCtrl_Impl::GetPredecessorGrid( const Point& rPos) const
if( rPos.X() < nMiddle )
{
if( !nGrid )
- nGrid = ULONG_MAX;
+ nGrid = GRID_NOT_FOUND;
else
nGrid--;
}
More information about the Libreoffice-commits
mailing list