Base: modernize C++: use range-based for loop

This commit is contained in:
wmayer
2023-08-14 13:40:11 +02:00
committed by wwmayer
parent 2fd17be361
commit 367cdb36ed
13 changed files with 104 additions and 100 deletions

View File

@@ -165,8 +165,8 @@ void Type::init()
void Type::destruct()
{
for(std::vector<TypeData*>::const_iterator it = typedata.begin();it!= typedata.end();++it)
delete *it;
for(auto it : typedata)
delete it;
typedata.clear();
typemap.clear();
loadModuleSet.clear();
@@ -218,11 +218,11 @@ int Type::getAllDerivedFrom(const Type type, std::vector<Type> & List)
{
int cnt = 0;
for(std::vector<TypeData*>::const_iterator it = typedata.begin();it!= typedata.end();++it)
for(auto it : typedata)
{
if ((*it)->type.isDerivedFrom(type))
if (it->type.isDerivedFrom(type))
{
List.push_back((*it)->type);
List.push_back(it->type);
cnt++;
}
}