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 <sberg...@redhat.com> AuthorDate: Thu Nov 19 16:56:23 2020 +0100 Commit: Stephan Bergmann <sberg...@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 <sberg...@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--; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits