mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: code adjustments for updated NullObject
- can now safely use labelList::null() instead of emptyLabelList for
return values. No special treatment required for lists.
Possible replacements:
if (notNull(list) && list.size()) -> if (list.size())
if (isNull(list) || list.empty()) -> if (list.empty())
The receiver may still wish to handle differently to distinguish
between a null list and an empty list, but no additional special
protection is required when obtaining sizes, traversing, outputting
etc.
This commit is contained in:
committed by
Andrew Heather
parent
0800e021ad
commit
078e34746e
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
@ -2400,7 +2400,7 @@ const Foam::labelList& Foam::dynamicIndexedOctree<Type>::findIndices
|
||||
return *(contents_[getContent(contentIndex)]);
|
||||
}
|
||||
|
||||
return Foam::emptyLabelList;
|
||||
return labelList::null();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user