FixedList: Corrected checkSize
Resolves bug-report http://bugs.openfoam.org/view.php?id=2178
This commit is contained in:
parent
1d4bedae68
commit
232a2a092c
2 changed files with 3 additions and 7 deletions
|
|
@ -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) + '>') << " ";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue