From ff03820a198172d5d191280191293fb7cda0481e Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 12 Jan 2018 12:40:45 +0100 Subject: [PATCH] #2152 Minor refactoring --- .../ModelVisualization/RivWellFracturePartMgr.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ApplicationCode/ModelVisualization/RivWellFracturePartMgr.cpp b/ApplicationCode/ModelVisualization/RivWellFracturePartMgr.cpp index 0132d44d24..22b48cd0dd 100644 --- a/ApplicationCode/ModelVisualization/RivWellFracturePartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivWellFracturePartMgr.cpp @@ -93,7 +93,7 @@ cvf::ref RivWellFracturePartMgr::createEllipseSurfacePart(const RimEc displayCoords.push_back(static_cast(displayCoordsDouble)); } - if (triangleIndices.size() == 0 || displayCoords.size() == 0) + if (triangleIndices.empty() || displayCoords.empty()) { return nullptr; } @@ -135,9 +135,9 @@ cvf::ref RivWellFracturePartMgr::createStimPlanSurfacePart(const RimE std::vector triangleIndices; m_rimFracture->triangleGeometry(&triangleIndices, &nodeCoords); - if (triangleIndices.size() == 0 || nodeCoords.size() == 0) + if (triangleIndices.empty() || nodeCoords.empty()) { - return NULL; + return nullptr; } // Transforms the node coordinates for display @@ -198,7 +198,7 @@ cvf::ref RivWellFracturePartMgr::createStimPlanSurfacePart(const RimE } } - if (triIndicesToInclude.size() == 0) + if (triIndicesToInclude.empty()) { return nullptr; } @@ -437,14 +437,14 @@ cvf::ref RivWellFracturePartMgr::createStimPlanMeshDrawable(Ri { const RigFractureCell& stimPlanCell = stimPlanCells[cIdx]; std::vector stimPlanCellPolygon = stimPlanCell.getPolygon(); - for (cvf::Vec3d cellCorner : stimPlanCellPolygon) + for (const cvf::Vec3d& cellCorner : stimPlanCellPolygon) { stimPlanMeshVertices.push_back(static_cast(cellCorner)); } } } - if (stimPlanMeshVertices.size() == 0) + if (stimPlanMeshVertices.empty()) { return nullptr; }