diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2016-04-17 22:54:57 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2016-04-18 05:08:47 +0000 |
commit | 101e5bbc8aaa77d5db36e0969a512b5a283f1672 (patch) | |
tree | 323ec88fb975a6c80eb171a36722e38aaa565ba6 /svx/source/stbctrls | |
parent | 92ddd584f1b8777932d86e26120977b9b66af8a4 (diff) |
Use const_iterator when possible (svx/gallery2,items,sdr,stbctrls)
Change-Id: Idd8992fcb76c25120202b24a23820d85ca09e434
Reviewed-on: https://gerrit.libreoffice.org/24174
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'svx/source/stbctrls')
-rw-r--r-- | svx/source/stbctrls/zoomsliderctrl.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx index 3c56ee9bb52f..3f2fc415f77d 100644 --- a/svx/source/stbctrls/zoomsliderctrl.cxx +++ b/svx/source/stbctrls/zoomsliderctrl.cxx @@ -79,9 +79,9 @@ sal_uInt16 SvxZoomSliderControl::Offset2Zoom( long nOffset ) const // check for snapping points: sal_uInt16 nCount = 0; - std::vector< long >::iterator aSnappingPointIter; - for ( aSnappingPointIter = mxImpl->maSnappingPointOffsets.begin(); - aSnappingPointIter != mxImpl->maSnappingPointOffsets.end(); + for ( std::vector< long >::const_iterator aSnappingPointIter = mxImpl->maSnappingPointOffsets.begin(), + aEnd = mxImpl->maSnappingPointOffsets.end(); + aSnappingPointIter != aEnd; ++aSnappingPointIter ) { const long nCurrent = *aSnappingPointIter; @@ -223,10 +223,10 @@ void SvxZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eStat } // remove snapping points that are to close to each other: - std::set< sal_uInt16 >::iterator aSnappingPointIter; long nLastOffset = 0; - for ( aSnappingPointIter = aTmpSnappingPoints.begin(); aSnappingPointIter != aTmpSnappingPoints.end(); ++aSnappingPointIter ) + for ( std::set< sal_uInt16 >::const_iterator aSnappingPointIter = aTmpSnappingPoints.begin(), + aEnd = aTmpSnappingPoints.end(); aSnappingPointIter != aEnd; ++aSnappingPointIter ) { const sal_uInt16 nCurrent = *aSnappingPointIter; const long nCurrentOffset = Zoom2Offset( nCurrent ); @@ -270,9 +270,9 @@ void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt ) // draw snapping points: - std::vector< long >::iterator aSnappingPointIter; - for ( aSnappingPointIter = mxImpl->maSnappingPointOffsets.begin(); - aSnappingPointIter != mxImpl->maSnappingPointOffsets.end(); + for ( std::vector< long >::const_iterator aSnappingPointIter = mxImpl->maSnappingPointOffsets.begin(), + aEnd = mxImpl->maSnappingPointOffsets.end(); + aSnappingPointIter != aEnd; ++aSnappingPointIter ) { long nSnapPosX = aRect.Left() + *aSnappingPointIter; |