From 4440a34bf976fb7f8678310149940a985ec52df9 Mon Sep 17 00:00:00 2001 From: Dominik Christ Date: Thu, 16 Jan 2014 13:06:00 +0000 Subject: [PATCH] Changed checking UList from direct memory access to .empty() --- src/sampling/cuttingPlane/cuttingPlane.C | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sampling/cuttingPlane/cuttingPlane.C b/src/sampling/cuttingPlane/cuttingPlane.C index 7aa6d8053..43d8b1d1c 100644 --- a/src/sampling/cuttingPlane/cuttingPlane.C +++ b/src/sampling/cuttingPlane/cuttingPlane.C @@ -52,7 +52,7 @@ void Foam::cuttingPlane::calcCutCells const edgeList& edges = mesh.edges(); label listSize = cellEdges.size(); - if (&cellIdLabels) + if (!cellIdLabels.empty()) { listSize = cellIdLabels.size(); } @@ -65,7 +65,7 @@ void Foam::cuttingPlane::calcCutCells for (label listI = 0; listI < listSize; ++listI) { label cellI = listI; - if (&cellIdLabels) + if (!cellIdLabels.empty()) { cellI = cellIdLabels[listI]; } @@ -402,7 +402,7 @@ void Foam::cuttingPlane::remapFaces ) { // recalculate the cells cut - if (&faceMap && faceMap.size()) + if (!faceMap.empty()) { MeshStorage::remapFaces(faceMap);