From 720c83d2e385e151324a0338df87a213181c5f1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Thu, 31 Oct 2019 14:58:11 +0100 Subject: [PATCH] caf::Viewer: Fixed linux warnings and a bogus comparison --- Fwk/AppFwk/cafViewer/cafViewer.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Fwk/AppFwk/cafViewer/cafViewer.cpp b/Fwk/AppFwk/cafViewer/cafViewer.cpp index 8a56f79c7f..36d4005ad4 100644 --- a/Fwk/AppFwk/cafViewer/cafViewer.cpp +++ b/Fwk/AppFwk/cafViewer/cafViewer.cpp @@ -551,7 +551,7 @@ bool caf::Viewer::calculateNearFarPlanes(const cvf::Rendering* rendering, } // Guard against the zero nearplane possibility - if ( nearPlaneDist <= 0 ) (*nearPlaneDist) = m_defaultPerspectiveNearPlaneDistance; + if ( (*nearPlaneDist) <= 0 ) (*nearPlaneDist) = m_defaultPerspectiveNearPlaneDistance; } else // Orthographic projection. Set to encapsulate the complete boundingbox, possibly setting a negative nearplane { @@ -986,7 +986,7 @@ void caf::Viewer::setCurrentComparisonFrame(int frameIndex) { if (m_frameScenes.size() == 0) return; - int clampedFrameIndex = clampFrameIndex(frameIndex); + unsigned clampedFrameIndex = static_cast(clampFrameIndex(frameIndex)); if (m_releaseOGLResourcesEachFrame) { @@ -1020,9 +1020,7 @@ void caf::Viewer::slotSetCurrentFrame(int frameIndex) { if (m_frameScenes.size() == 0) return; - int clampedFrameIndex = clampFrameIndex(frameIndex); - - //if (m_frameScenes.at(clampedFrameIndex) == nullptr) return; + unsigned clampedFrameIndex = static_cast(clampFrameIndex(frameIndex)); if (m_releaseOGLResourcesEachFrame) {