editeng/source/editeng/ContentNode.cxx |    3 ---
 vcl/source/window/menuitemlist.cxx     |    5 +----
 2 files changed, 1 insertion(+), 7 deletions(-)

New commits:
commit 10c2eee93be76d8bdad980bd86d02c84896758c1
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Fri Dec 6 19:53:51 2024 +0200
Commit:     Noel Grandin <noelgran...@gmail.com>
CommitDate: Mon Dec 9 10:46:32 2024 +0100

    remove some range checks
    
    which are more likely to hide an underlying bug than they are to help
    
    Change-Id: I118b592677df05246912d7fa3d7ab8ca2fe99377
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177999
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/editeng/source/editeng/ContentNode.cxx 
b/editeng/source/editeng/ContentNode.cxx
index b7e7f4b0e8ee..3721016db04c 100644
--- a/editeng/source/editeng/ContentNode.cxx
+++ b/editeng/source/editeng/ContentNode.cxx
@@ -906,9 +906,6 @@ void CharAttribList::Remove(const EditCharAttrib* p)
 
 void CharAttribList::Remove(sal_Int32 nPos)
 {
-    if (nPos >= static_cast<sal_Int32>(maAttribs.size()))
-        return;
-
     maAttribs.erase(maAttribs.begin()+nPos);
 }
 
commit b0d6329c055d66a7a07fbbee89015e3843945682
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Fri Dec 6 21:58:03 2024 +0200
Commit:     Noel Grandin <noelgran...@gmail.com>
CommitDate: Mon Dec 9 10:46:24 2024 +0100

    remove some range checks
    
    which are more likely to hide an underlying bug than they are to help
    
    Change-Id: I5087827665bd6213142ee90450bf58d8d819c93f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178005
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/vcl/source/window/menuitemlist.cxx 
b/vcl/source/window/menuitemlist.cxx
index d6849e3e71a2..9a196a6723bb 100644
--- a/vcl/source/window/menuitemlist.cxx
+++ b/vcl/source/window/menuitemlist.cxx
@@ -138,10 +138,7 @@ void MenuItemList::InsertSeparator(const OUString &rIdent, 
size_t nPos)
 
 void MenuItemList::Remove( size_t nPos )
 {
-    if( nPos < maItemList.size() )
-    {
-        maItemList.erase( maItemList.begin() + nPos );
-    }
+    maItemList.erase( maItemList.begin() + nPos );
 }
 
 void MenuItemList::Clear()

Reply via email to