diff --git a/src/lagrangian/basic/InteractionLists/globalIndexAndTransform/globalIndexAndTransform.C b/src/lagrangian/basic/InteractionLists/globalIndexAndTransform/globalIndexAndTransform.C index d0a2703a89e88ab17b9487d43d1bee3eeb2e0c2b..3bcd500d04cdab78995873cd180db3b7d9508448 100644 --- a/src/lagrangian/basic/InteractionLists/globalIndexAndTransform/globalIndexAndTransform.C +++ b/src/lagrangian/basic/InteractionLists/globalIndexAndTransform/globalIndexAndTransform.C @@ -269,9 +269,9 @@ void Foam::globalIndexAndTransform::determineTransformPermutations() // Invert the ternary index encoding using repeated division by // three - for (label b = 0; b < transforms_.size(); b++) + forAll(transforms_, b) { - label w = (transformIndex % 3) - 1; + const label w = (transformIndex % 3) - 1; transformIndex /= 3; diff --git a/src/lagrangian/basic/InteractionLists/globalIndexAndTransform/globalIndexAndTransformI.H b/src/lagrangian/basic/InteractionLists/globalIndexAndTransform/globalIndexAndTransformI.H index da46fe08fe5b66f1fcb58bdd561356d27823a37c..fe2a6034a7ca94db4126b52ddbb0c8c01b399d4b 100644 --- a/src/lagrangian/basic/InteractionLists/globalIndexAndTransform/globalIndexAndTransformI.H +++ b/src/lagrangian/basic/InteractionLists/globalIndexAndTransform/globalIndexAndTransformI.H @@ -49,7 +49,7 @@ Foam::label Foam::globalIndexAndTransform::encodeTransformIndex label w = 1; - for (label b = 0; b < transforms_.size(); b++) + forAll(transforms_, b) { if (mag(permutationIndices[b]) > 1) {