From b96b51284e83e385cf268cc7553a6b99bdd5da90 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Mon, 23 Jan 2017 14:43:52 +0100 Subject: [PATCH] Fixed invalid comparison between signed and unsigned --- .../ProjectDataModel/Flow/RimWellAllocationPlot.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp index 735888a63f..211f0e83d8 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp @@ -128,7 +128,7 @@ void RimWellAllocationPlot::updateFromWell() if (!wellResults) return; - int branchCount = 0; + size_t branchCount = 0; const RigWellResultFrame* wellResultFrame = nullptr; std::vector< std::vector > pipeBranchesCLCoords; @@ -142,19 +142,19 @@ void RimWellAllocationPlot::updateFromWell() pipeBranchesCLCoords, pipeBranchesCellIds); - branchCount = static_cast(pipeBranchesCLCoords.size()); + branchCount = pipeBranchesCLCoords.size(); - int existingTrackCount = static_cast(accumulatedWellFlowPlot()->trackCount()); + size_t existingTrackCount = accumulatedWellFlowPlot()->trackCount(); accumulatedWellFlowPlot()->setDescription("Accumulated Well Flow (" + m_wellName + ")"); - int neededExtraTrackCount = branchCount - existingTrackCount; - for (int etc = 0; etc < neededExtraTrackCount; ++etc) + size_t neededExtraTrackCount = branchCount - existingTrackCount; + for (size_t etc = 0; etc < neededExtraTrackCount; ++etc) { RimWellLogTrack* plotTrack = new RimWellLogTrack(); accumulatedWellFlowPlot()->addTrack(plotTrack); } - for (int etc = branchCount; etc < existingTrackCount; ++etc) + for (size_t etc = branchCount; etc < existingTrackCount; ++etc) { accumulatedWellFlowPlot()->removeTrackByIndex(accumulatedWellFlowPlot()->trackCount()- 1); }