Commit 232a2a09 authored by Henry Weller's avatar Henry Weller
Browse files

FixedList: Corrected checkSize

Resolves bug-report http://bugs.openfoam.org/view.php?id=2178
parent 1d4bedae
......@@ -140,10 +140,10 @@ inline void Foam::FixedList<T, Size>::checkStart(const label start) const
template<class T, unsigned Size>
inline void Foam::FixedList<T, Size>::checkSize(const label size) const
{
if (size < 0 || unsigned(size) > Size)
if (unsigned(size) != Size)
{
FatalErrorInFunction
<< "size " << size << " out of range 0 ... " << (Size)
<< "size " << size << " != " << Size
<< abort(FatalError);
}
}
......
......@@ -138,11 +138,7 @@ void Foam::FixedList<T, Size>::writeEntry(Ostream& os) const
{
if
(
size()
&& token::compound::isCompound
(
"List<" + word(pTraits<T>::typeName) + '>'
)
token::compound::isCompound("List<" + word(pTraits<T>::typeName) + '>')
)
{
os << word("List<" + word(pTraits<T>::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