Commit 7cceda62 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

BUG: comparison to static end() for hashtable lookup.

- just use the iterator method found() as an alternative and
  convenient way to avoid the issue with less typing.
parent dc57c016
......@@ -64,14 +64,14 @@ Enum Foam::NamedEnum<Enum, nEnum>::read(Istream& is) const
HashTable<int>::const_iterator iter = find(name);
if (iter == HashTable<int>::end())
if (!iter.found())
{
FatalIOErrorInFunction(is)
<< name << " is not in enumeration: "
<< sortedToc() << exit(FatalIOError);
}
return Enum(iter());
return Enum(*iter);
}
......
......@@ -183,7 +183,7 @@ Foam::string& Foam::stringOps::inplaceExpand
HashTable<string, word, string::hash>::const_iterator fnd =
mapping.find(varName);
if (fnd != HashTable<string, word, string::hash>::end())
if (fnd.found())
{
if (altPos != string::npos && altType == '+')
{
......
......@@ -115,7 +115,7 @@ void Foam::patchProbes::sampleAndWrite
if
(
iter != objectRegistry::end()
iter.found()
&& iter()->type()
== GeometricField<Type, fvPatchField, volMesh>::typeName
)
......@@ -167,7 +167,7 @@ void Foam::patchProbes::sampleAndWriteSurfaceFields
if
(
iter != objectRegistry::end()
iter.found()
&& iter()->type()
== GeometricField<Type, fvsPatchField, surfaceMesh>::typeName
)
......
......@@ -141,7 +141,7 @@ void Foam::probes::sampleAndWrite(const fieldGroup<Type>& fields)
if
(
iter != objectRegistry::end()
iter.found()
&& iter()->type()
== GeometricField<Type, fvPatchField, volMesh>::typeName
)
......@@ -190,7 +190,7 @@ void Foam::probes::sampleAndWriteSurfaceFields(const fieldGroup<Type>& fields)
if
(
iter != objectRegistry::end()
iter.found()
&& iter()->type()
== GeometricField<Type, fvsPatchField, surfaceMesh>::typeName
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment