From 3644f4eb76627dbcb219711f7ff11928aacecace Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 11 Aug 2017 16:17:40 +0200 Subject: [PATCH] Do not compare signed with unsigned --- .../ProjectDataModel/Completions/RimFractureContainment.cpp | 6 +++--- ApplicationCode/ReservoirDataModel/RigCellGeometryTools.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/Completions/RimFractureContainment.cpp b/ApplicationCode/ProjectDataModel/Completions/RimFractureContainment.cpp index 0aeabee450..c4e603b634 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimFractureContainment.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimFractureContainment.cpp @@ -92,17 +92,17 @@ bool RimFractureContainment::isEclipseCellWithinContainment(const RigMainGrid* m CVF_ASSERT(mainGrid); - size_t i,j,k; + size_t i, j, k; if (globalCellIndex >= mainGrid->globalCellArray().size()) return false; bool ok = mainGrid->ijkFromCellIndex(globalCellIndex, &i, &j, &k); - if (k+1 < m_topKLayer()) + if (k + 1 < static_cast(m_topKLayer())) { return false; } - if (k+1 > m_baseKLayer()) + if (k + 1 > static_cast(m_baseKLayer())) { return false; } diff --git a/ApplicationCode/ReservoirDataModel/RigCellGeometryTools.cpp b/ApplicationCode/ReservoirDataModel/RigCellGeometryTools.cpp index a535375494..4aed46d7c6 100644 --- a/ApplicationCode/ReservoirDataModel/RigCellGeometryTools.cpp +++ b/ApplicationCode/ReservoirDataModel/RigCellGeometryTools.cpp @@ -464,7 +464,7 @@ std::vector RigCellGeometryTools::ajustPolygonToAvoidIntersectionsAt for (cvf::Vec3d polygonPoint : polygon) { - for (int i = 0; i < polyLine.size() - 1; i++) + for (size_t i = 0; i < polyLine.size() - 1; i++) { cvf::Vec3d linePoint1(polyLine[i].x(), polyLine[i].y(), 0.0); cvf::Vec3d linePoint2(polyLine[i + 1].x(), polyLine[i + 1].y(), 0.0);