mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Linux compile warning
This commit is contained in:
@@ -1155,17 +1155,18 @@ void caf::Viewer::updateParallelProjectionCameraPosFromPointOfInterestMove(const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int caf::Viewer::clampFrameIndex(int frameIndex) const
|
||||
{
|
||||
size_t clampedFrameIndex = static_cast<size_t>(frameIndex);
|
||||
int clampedFrameIndex = frameIndex;
|
||||
int frameCountInt = static_cast<int>(frameCount());
|
||||
|
||||
if (clampedFrameIndex >= frameCount())
|
||||
if (clampedFrameIndex >= frameCountInt)
|
||||
{
|
||||
clampedFrameIndex = frameCount() - 1;
|
||||
clampedFrameIndex = frameCountInt - 1;
|
||||
}
|
||||
else if (clampedFrameIndex < 0)
|
||||
{
|
||||
clampedFrameIndex = 0;
|
||||
}
|
||||
|
||||
return static_cast<int>(clampedFrameIndex);
|
||||
return clampedFrameIndex;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user