STYLE: use forAllIter, forAllConstIter in more places

ENH: change some iterator -> const_iterator access

BUG: found some places with forAllIter and ::iterator !
This commit is contained in:
Mark Olesen
2010-04-13 09:10:36 +02:00
parent 5636df2b5a
commit 874120350c
37 changed files with 139 additions and 338 deletions

View File

@ -143,12 +143,7 @@ void addPatchFields(fvMesh& mesh, const word& patchFieldType)
mesh.objectRegistry::lookupClass<GeoField>()
);
for
(
typename HashTable<const GeoField*>::const_iterator iter = flds.begin();
iter != flds.end();
++iter
)
forAllConstIter(typename HashTable<const GeoField*>, flds, iter)
{
const GeoField& fld = *iter();
@ -183,12 +178,7 @@ void trimPatchFields(fvMesh& mesh, const label nPatches)
mesh.objectRegistry::lookupClass<GeoField>()
);
for
(
typename HashTable<const GeoField*>::const_iterator iter = flds.begin();
iter != flds.end();
++iter
)
forAllConstIter(typename HashTable<const GeoField*>, flds, iter)
{
const GeoField& fld = *iter();
@ -209,12 +199,7 @@ void reorderPatchFields(fvMesh& mesh, const labelList& oldToNew)
mesh.objectRegistry::lookupClass<GeoField>()
);
for
(
typename HashTable<const GeoField*>::const_iterator iter = flds.begin();
iter != flds.end();
++iter
)
forAllConstIter(typename HashTable<const GeoField*>, flds, iter)
{
const GeoField& fld = *iter();
@ -1461,7 +1446,7 @@ int main(int argc, char *argv[])
mesh.setInstance(meshInstance);
}
// Change master and slave boundary conditions on originating mesh