summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-03-13 21:11:09 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-03-16 20:16:46 +0100
commit10a48c737d347bcce765c8fbe009bc1dd0bb0c4d (patch)
tree6688e9ca36964bcbf589e60452a331b49a81bfde /bridges
parentbb9728bbf9bb29ef2b6ca582a382f66e9adf2623 (diff)
Simplify containers iterations in basctl, basegfx, basic, bridges
Use range-based loop or replace with STL functions Change-Id: I8594740103bdc2091c2d03d4b92bbe8393f5378c Reviewed-on: https://gerrit.libreoffice.org/69223 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/msvc_win32_intel/except.cxx10
-rw-r--r--bridges/source/cpp_uno/shared/vtablefactory.cxx8
2 files changed, 8 insertions, 10 deletions
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
index b706c1b343fc..4f761ef3ed20 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
@@ -157,10 +157,9 @@ RTTInfos::~RTTInfos() throw ()
SAL_INFO("bridges", "> freeing generated RTTI infos... <");
MutexGuard aGuard( _aMutex );
- for ( t_string2PtrMap::const_iterator iPos( _allRTTI.begin() );
- iPos != _allRTTI.end(); ++iPos )
+ for ( auto& rEntry : _allRTTI )
{
- __type_info * pType = reinterpret_cast<__type_info*>(iPos->second);
+ __type_info * pType = reinterpret_cast<__type_info*>(rEntry.second);
pType->~__type_info(); // obsolete, but good style...
std::free( pType );
}
@@ -375,10 +374,9 @@ ExceptionInfos::~ExceptionInfos() throw ()
SAL_INFO("bridges", "> freeing exception infos... <");
MutexGuard aGuard( _aMutex );
- for ( t_string2PtrMap::const_iterator iPos( _allRaiseInfos.begin() );
- iPos != _allRaiseInfos.end(); ++iPos )
+ for ( auto& rEntry : _allRaiseInfos )
{
- delete reinterpret_cast<RaiseInfo*>(iPos->second);
+ delete reinterpret_cast<RaiseInfo*>(rEntry.second);
}
}
diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx b/bridges/source/cpp_uno/shared/vtablefactory.cxx
index 4789b0341ebd..a40e9e08b53d 100644
--- a/bridges/source/cpp_uno/shared/vtablefactory.cxx
+++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx
@@ -181,11 +181,11 @@ VtableFactory::VtableFactory(): m_arena(
VtableFactory::~VtableFactory() {
{
osl::MutexGuard guard(m_mutex);
- for (Map::iterator i(m_map.begin()); i != m_map.end(); ++i) {
- for (sal_Int32 j = 0; j < i->second.count; ++j) {
- freeBlock(i->second.blocks[j]);
+ for (auto& rEntry : m_map) {
+ for (sal_Int32 j = 0; j < rEntry.second.count; ++j) {
+ freeBlock(rEntry.second.blocks[j]);
}
- delete[] i->second.blocks;
+ delete[] rEntry.second.blocks;
}
}
rtl_arena_destroy(m_arena);