using const methods

This commit is contained in:
Uwe Rathmann 2022-03-24 17:18:27 +01:00
parent fe372f64e4
commit b572c23561
2 changed files with 4 additions and 3 deletions

View File

@ -292,7 +292,7 @@ namespace
m_skinMap.clear(); m_skinMap.clear();
// first we try all factories, that have been added manually // first we try all factories, that have been added manually
for ( auto it = m_factoryMap.begin(); it != m_factoryMap.end(); ++it ) for ( auto it = m_factoryMap.constBegin(); it != m_factoryMap.constEnd(); ++it )
{ {
const auto& data = it.value(); const auto& data = it.value();
@ -301,7 +301,7 @@ namespace
} }
// all factories from plugins are following // all factories from plugins are following
for ( auto it = m_factoryMap.begin(); it != m_factoryMap.end(); ++it ) for ( auto it = m_factoryMap.constBegin(); it != m_factoryMap.constEnd(); ++it )
{ {
const auto& data = it.value(); const auto& data = it.value();
if ( data.loader ) if ( data.loader )

View File

@ -28,7 +28,8 @@ QskGraphicProviderMap::QskGraphicProviderMap()
QskGraphicProviderMap::~QskGraphicProviderMap() QskGraphicProviderMap::~QskGraphicProviderMap()
{ {
for ( auto it = m_data->hashTab.begin(); it != m_data->hashTab.end(); ++it ) const auto& hashTab = m_data->hashTab;
for ( auto it = hashTab.constBegin(); it != hashTab.constEnd(); ++it )
delete it.value(); delete it.value();
} }