mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use UPtrList::test() instead of separate bounds checking
This commit is contained in:
@ -627,9 +627,7 @@ bool Foam::functionObjects::vtkWrite::write()
|
||||
{
|
||||
const label nPatchFields =
|
||||
(
|
||||
writeri < patchInterps.size() && patchInterps.set(writeri)
|
||||
? nVolFields
|
||||
: 0
|
||||
patchInterps.test(writeri) ? nVolFields : 0
|
||||
);
|
||||
|
||||
if (nPatchFields)
|
||||
|
||||
@ -128,7 +128,7 @@ Foam::label Foam::functionObjects::vtkWrite::writeVolFieldsImpl
|
||||
label writeri = 0;
|
||||
for (vtk::patchWriter& writer : patchWriters)
|
||||
{
|
||||
if (writeri < patchInterps.size() && patchInterps.set(writeri))
|
||||
if (patchInterps.test(writeri))
|
||||
{
|
||||
ok = true;
|
||||
writer.write(field, patchInterps[writeri]);
|
||||
|
||||
Reference in New Issue
Block a user