diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedListI.H b/src/OpenFOAM/containers/Lists/FixedList/FixedListI.H index 0b0daf1d7..dd3c6c654 100644 --- a/src/OpenFOAM/containers/Lists/FixedList/FixedListI.H +++ b/src/OpenFOAM/containers/Lists/FixedList/FixedListI.H @@ -140,10 +140,10 @@ inline void Foam::FixedList::checkStart(const label start) const template inline void Foam::FixedList::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); } } diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C b/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C index 2bf821a36..9119234ef 100644 --- a/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C +++ b/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C @@ -138,11 +138,7 @@ void Foam::FixedList::writeEntry(Ostream& os) const { if ( - size() - && token::compound::isCompound - ( - "List<" + word(pTraits::typeName) + '>' - ) + token::compound::isCompound("List<" + word(pTraits::typeName) + '>') ) { os << word("List<" + word(pTraits::typeName) + '>') << " ";