remove some range checks
which are more likely to hide an underlying bug than they are to help Change-Id: Ifba3c38e9dc6c3d47c9c62bebf5b5e68f11d9ee7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178004 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
d18ab050c4
commit
3339fd9a3f
1 changed files with 1 additions and 7 deletions
|
@ -1069,13 +1069,7 @@ void HeaderBar::RemoveItem( sal_uInt16 nItemId )
|
|||
{
|
||||
sal_uInt16 nPos = GetItemPos( nItemId );
|
||||
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
|
||||
{
|
||||
if ( nPos < mvItemList.size() ) {
|
||||
auto it = mvItemList.begin();
|
||||
it += nPos;
|
||||
mvItemList.erase( it );
|
||||
}
|
||||
}
|
||||
mvItemList.erase( mvItemList.begin() + nPos );
|
||||
}
|
||||
|
||||
void HeaderBar::MoveItem( sal_uInt16 nItemId, sal_uInt16 nNewPos )
|
||||
|
|
Loading…
Reference in a new issue