remove some range checks

which are more likely to hide an underlying bug than they are to help

Change-Id: I3bcac401d62f9baf27e72bacb6bb0a2315d1c081
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178000
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2024-12-06 20:24:44 +02:00
parent 0aa4bfe37a
commit d18ab050c4

View file

@ -524,9 +524,7 @@ void ValueSet::RemoveItem( sal_uInt16 nItemId )
if ( nPos == VALUESET_ITEM_NOTFOUND )
return;
if ( nPos < mItemList.size() ) {
mItemList.erase( mItemList.begin() + nPos );
}
mItemList.erase( mItemList.begin() + nPos );
// reset variables
if (mnHighItemId == nItemId || mnSelItemId == nItemId)