ENH: List: Output of zero or single element non-contiguous lists
This commit is contained in:
parent
ced5391952
commit
0750ff309b
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -198,7 +198,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const FixedList<T, Size>& L)
|
||||
// Write end delimiter
|
||||
os << token::END_BLOCK;
|
||||
}
|
||||
else if (Size < 11 && contiguous<T>())
|
||||
else if (Size <= 1 ||(Size < 11 && contiguous<T>()))
|
||||
{
|
||||
// Write start delimiter
|
||||
os << token::BEGIN_LIST;
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -67,7 +67,7 @@ Foam::Ostream& Foam::operator<<
|
||||
// Write end delimiter
|
||||
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
|
||||
os << L.size() << token::BEGIN_LIST;
|
||||
|
@ -92,7 +92,7 @@ Foam::Ostream& Foam::operator<<(Foam::Ostream& os, const Foam::UList<T>& L)
|
||||
// Write end delimiter
|
||||
os << token::END_BLOCK;
|
||||
}
|
||||
else if (L.size() == 1 || (L.size() < 11 && contiguous<T>()))
|
||||
else if (L.size() <= 1 || (L.size() < 11 && contiguous<T>()))
|
||||
{
|
||||
// Write size and start delimiter
|
||||
os << L.size() << token::BEGIN_LIST;
|
||||
|
Loading…
Reference in New Issue
Block a user