ENH: Use strict type lookup class for MapDimensionedFields

This commit is contained in:
andy 2012-08-13 09:49:19 +01:00
parent 368b543831
commit 218c34fc00

View File

@ -45,19 +45,7 @@ void MapDimensionedFields(const MeshMapper& mapper)
typedef DimensionedField<Type, GeoMesh> FieldType;
typedef HashTable<const FieldType*> TableType;
TableType fields(mapper.thisDb().size());
forAllConstIter(objectRegistry, mapper.thisDb(), iter)
{
if (isType<FieldType>(*iter()))
{
fields.insert
(
iter()->name(),
dynamic_cast<const FieldType*>(iter())
);
}
}
TableType fields(mapper.thisDb().template lookupClass<FieldType>(true));
forAllConstIter(typename TableType, fields, fieldIter)
{