summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-09-09 11:07:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-09-10 20:51:26 +0200
commitac240585063b3b74d062e3ce5384ac0705f51425 (patch)
tree20fffe61280eab827fafda158cd27254854c3fa8 /sfx2
parent265f95d9a316b1ecfee21a01d46d04cc6eadee7b (diff)
micro-optim we just want to remove all urls after m_nCurPos (sfx2)
Change-Id: Ib27386baa81ee912ebb5112d721610c5fc3c708b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102287 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/helpinterceptor.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sfx2/source/appl/helpinterceptor.cxx b/sfx2/source/appl/helpinterceptor.cxx
index b69ca9fedd5f..75755ecbe640 100644
--- a/sfx2/source/appl/helpinterceptor.cxx
+++ b/sfx2/source/appl/helpinterceptor.cxx
@@ -50,10 +50,9 @@ void HelpInterceptor_Impl::addURL( const OUString& rURL )
size_t nCount = m_vHistoryUrls.size();
if ( nCount && m_nCurPos < ( nCount - 1 ) )
{
- for ( size_t i = nCount - 1; i > m_nCurPos; i-- )
- {
- m_vHistoryUrls.erase( m_vHistoryUrls.begin() + i );
- }
+ m_vHistoryUrls.erase(
+ m_vHistoryUrls.begin() + m_nCurPos + 1,
+ m_vHistoryUrls.end());
}
Reference<XFrame> xFrame(m_xIntercepted, UNO_QUERY);
Reference<XController> xController;