diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-08-24 19:28:56 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2013-08-26 19:16:31 +0000 |
commit | b2f6ef8423ca4f3c18c1603c3561388088fbc0cb (patch) | |
tree | c08ef934e860a48c6cd90db57de01325a30a5889 | |
parent | 250864d869153ceec5ef29804c0e9d00a8db82e2 (diff) |
Simplify a bit iterator management
Change-Id: Id15fb18df7b1a8da1ff260f8b2c72ed6cd5d352a
Reviewed-on: https://gerrit.libreoffice.org/5605
Tested-by: Jan Holesovsky <kendy@suse.cz>
Reviewed-by: Jan Holesovsky <kendy@suse.cz>
-rw-r--r-- | vcl/generic/app/gendisp.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/generic/app/gendisp.cxx b/vcl/generic/app/gendisp.cxx index fffb5aac2d20..0e197c15d24a 100644 --- a/vcl/generic/app/gendisp.cxx +++ b/vcl/generic/app/gendisp.cxx @@ -113,18 +113,18 @@ void SalGenericDisplay::CancelInternalEvent( SalFrame* pFrame, void* pData, sal_ { if( ! m_aUserEvents.empty() ) { - std::list< SalUserEvent >::iterator it, next; - next = m_aUserEvents.begin(); - do + std::list< SalUserEvent >::iterator it = m_aUserEvents.begin(); + while (it != m_aUserEvents.end()) { - it = next++; if( it->m_pFrame == pFrame && it->m_pData == pData && it->m_nEvent == nEvent ) { - m_aUserEvents.erase( it ); + it = m_aUserEvents.erase( it ); } - } while( next != m_aUserEvents.end() ); + else + ++it; + } } osl_releaseMutex( m_aEventGuard ); |