summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2024-12-06 20:24:44 +0200
committerNoel Grandin <noelgrandin@gmail.com>2024-12-09 10:46:06 +0100
commitd18ab050c4ce0536abd4bc9339a6dd1436172d7e (patch)
treed62c87935e38b6af4c94a6f803a2be586d5a7171
parent0aa4bfe37a80f3b17430cb91b4fd5e9e528efcbd (diff)
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>
-rw-r--r--svtools/source/control/valueset.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index a3dcb17d9a77..f1437e6aa0be 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -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)