summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2016-03-10 22:05:57 +0100
committerNoel Grandin <noelgrandin@gmail.com>2016-03-11 07:18:59 +0000
commit05ff3d112b79202f393f9067fec4fe72f2d8ac3c (patch)
tree3f35a189c6b43d321f332524cb322af014909e56 /cppu
parente94d5233dd7939c54eb52fff456e817cecdf0a4c (diff)
Let's use the iterator return by erase method of iterator list
and avoid to retrieve list->begin and loop from the first element Change-Id: I536b7a03c4033b02a7226d25f64764c10c28bdd0 Reviewed-on: https://gerrit.libreoffice.org/23126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'cppu')
-rw-r--r--cppu/source/typelib/typelib.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index 254abd76293a..55ee766917cc 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -354,12 +354,11 @@ extern "C" void SAL_CALL typelib_typedescription_revokeCallback(
// OslGuard aGuard( rInit.getMutex() );
CallbackEntry aEntry( pContext, pCallback );
CallbackSet_Impl::iterator iPos( rInit.pCallbacks->begin() );
- while (!(iPos == rInit.pCallbacks->end()))
+ while (iPos != rInit.pCallbacks->end())
{
if (*iPos == aEntry)
{
- rInit.pCallbacks->erase( iPos );
- iPos = rInit.pCallbacks->begin();
+ iPos = rInit.pCallbacks->erase(iPos);
}
else
{