STYLE: use UPtrList::test() instead of separate bounds checking

This commit is contained in:
Mark Olesen
2023-07-05 20:40:18 +02:00
parent 65cddb6120
commit 8562f4d7a4
5 changed files with 36 additions and 35 deletions

View File

@ -368,11 +368,7 @@ Description
{
const label nPatchFields =
(
(
writeri < patchInterps.size() && patchInterps.set(writeri)
? nVolFields
: 0
)
(patchInterps.test(writeri) ? nVolFields : 0)
+ nPointFields
);

View File

@ -116,7 +116,7 @@ label writeVolFields
label writeri = 0;
for (vtk::patchWriter& writer : patchWriters)
{
if (writeri < patchInterps.size() && patchInterps.set(writeri))
if (patchInterps.test(writeri))
{
writer.write(tfield(), patchInterps[writeri]);
}