STYLE: Enable indentation for short non-contiguous lists

This commit is contained in:
Henrik Rusche 2018-12-30 16:06:11 +01:00
parent 752fce1a02
commit e114bb940d
3 changed files with 3 additions and 3 deletions

View file

@ -198,7 +198,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const FixedList<T, Size>& L)
// Write end delimiter // Write end delimiter
os << token::END_BLOCK; os << token::END_BLOCK;
} }
else if (Size < 11 && contiguous<T>()) else if (Size <= 1 ||(Size < 11 && contiguous<T>()))
{ {
// Write start delimiter // Write start delimiter
os << token::BEGIN_LIST; os << token::BEGIN_LIST;

View file

@ -67,7 +67,7 @@ Foam::Ostream& Foam::operator<<
// Write end delimiter // Write end delimiter
os << token::END_BLOCK; os << token::END_BLOCK;
} }
else if (L.size() < 11 && contiguous<T>()) else if (L.size() <= 1 || (L.size() < 11 && contiguous<T>()))
{ {
// Write size and start delimiter // Write size and start delimiter
os << L.size() << token::BEGIN_LIST; os << L.size() << token::BEGIN_LIST;

View file

@ -92,7 +92,7 @@ Foam::Ostream& Foam::operator<<(Foam::Ostream& os, const Foam::UList<T>& L)
// Write end delimiter // Write end delimiter
os << token::END_BLOCK; os << token::END_BLOCK;
} }
else if (L.size() < 11 && contiguous<T>()) else if (L.size() <= 1 || (L.size() < 11 && contiguous<T>()))
{ {
// Write size and start delimiter // Write size and start delimiter
os << L.size() << token::BEGIN_LIST; os << L.size() << token::BEGIN_LIST;