summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-12-31 16:44:52 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-02 15:55:53 +0100
commite7fd8ee57c69e676ec622d13212ab3b3091c1a2d (patch)
tree576ff434111bfc171b5a73f7f9e786df1c047408 /svx
parent1e83e713b3e2ef5bb0aa123910598b37a2a97ffe (diff)
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 <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/table/tablemodel.cxx16
1 files changed, 1 insertions, 15 deletions
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);
}
}
}