svx/source/table/tablemodel.cxx | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-)
New commits: commit e7fd8ee57c69e676ec622d13212ab3b3091c1a2d Author: Julien Nabet <serval2...@yahoo.fr> Date: Sun Dec 31 16:44:52 2017 +0100 cppcheck: fix prefer ++/-- for non primitive types Here, we can just initialize the iterators with the right increment instead of using while loops to increment them Change-Id: I08b51ba11398dbb705d3ed83bfbf46df0deb7f21 Reviewed-on: https://gerrit.libreoffice.org/47224 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx index bbe6c42edebd..4d6a558a3622 100644 --- a/svx/source/table/tablemodel.cxx +++ b/svx/source/table/tablemodel.cxx @@ -67,21 +67,7 @@ template< class Vec, class Iter > void remove_range( Vec& rVector, sal_Int32 nIn } else { - Iter aBegin( rVector.begin() ); - while( nIndex-- ) - aBegin++; - if( nCount == 1 ) - { - rVector.erase( aBegin ); - } - else - { - Iter aEnd( aBegin ); - - while( nCount-- ) - aEnd++; - rVector.erase( aBegin, aEnd ); - } + rVector.erase(rVector.begin() + nIndex, rVector.begin() + nIndex + nCount); } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits