diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C index 6dc3232522..e0ca6d1124 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2015-2022,2024 OpenCFD Ltd. + Copyright (C) 2015-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -179,7 +179,7 @@ Foam::labelPair Foam::addPatchCellLayer::getEdgeString // Get edge that hasn't been done yet but needs extrusion forAll(fEdges, fp) { - label edgei = fEdges[fp]; + const label edgei = fEdges[fp]; const edge& e = pp.edges()[edgei]; if @@ -197,7 +197,7 @@ Foam::labelPair Foam::addPatchCellLayer::getEdgeString { // We found an edge that needs extruding but hasn't been done yet. // Now find the face on the other side - label nbrGlobalFacei = nbrFace + const label nbrGlobalFacei = nbrFace ( globalEdgeFaces, fEdges[startFp], diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C index d4372068a6..9c122d7518 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2015-2024 OpenCFD Ltd. + Copyright (C) 2015-2025 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -2652,16 +2652,8 @@ void Foam::snappySnapDriver::doSnap { if (addLayers[globalRegioni]) { - const label masterP = - globalToMasterPatch_[globalRegioni]; - const label slaveP = - globalToSlavePatch_[globalRegioni]; - - bufPatchIDs.append(masterP); - if (slaveP != masterP) - { - bufPatchIDs.append(slaveP); - } + bufPatchIDs.push_uniq(globalToMasterPatch_[globalRegioni]); + bufPatchIDs.push_uniq(globalToSlavePatch_[globalRegioni]); } }