mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
FixedList: Corrected checkSize
Resolves bug-report http://bugs.openfoam.org/view.php?id=2178
This commit is contained in:
@ -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) + '>') << " ";
|
||||
|
||||
Reference in New Issue
Block a user