Skip to content

Commit

Permalink
Fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 14, 2021
1 parent f76747b commit a1f47a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/qgstemporalnavigationobject.cpp
Expand Up @@ -156,7 +156,7 @@ void QgsTemporalNavigationObject::setTemporalExtents( const QgsDateTimeRange &te
{
case Animated:
{
int currentFrameNumber = mCurrentFrameNumber;
long long currentFrameNumber = mCurrentFrameNumber;

// Force to emit signal if the current frame number doesn't change
if ( currentFrameNumber == mCurrentFrameNumber && !mBlockUpdateTemporalRangeSignal )
Expand Down Expand Up @@ -235,7 +235,7 @@ void QgsTemporalNavigationObject::setFramesPerSecond( double framesPerSeconds )
if ( framesPerSeconds > 0 )
{
mFramesPerSecond = framesPerSeconds;
mNewFrameTimer->setInterval( ( 1.0 / mFramesPerSecond ) * 1000 );
mNewFrameTimer->setInterval( static_cast< int >( ( 1.0 / mFramesPerSecond ) * 1000 ) );
}
}

Expand All @@ -256,7 +256,7 @@ bool QgsTemporalNavigationObject::temporalRangeCumulative() const

void QgsTemporalNavigationObject::play()
{
mNewFrameTimer->start( ( 1.0 / mFramesPerSecond ) * 1000 );
mNewFrameTimer->start( static_cast< int >( ( 1.0 / mFramesPerSecond ) * 1000 ) );
}

void QgsTemporalNavigationObject::pause()
Expand Down Expand Up @@ -367,7 +367,7 @@ long long QgsTemporalNavigationObject::findBestFrameNumberForFrameStart( const Q
// We tend to receive a framestart of 'now()' upon startup for example
if ( mTemporalExtents.contains( frameStart ) )
{
roughFrameStart = std::floor( ( frameStart - mTemporalExtents.begin() ).seconds() / mFrameDuration.seconds() );
roughFrameStart = static_cast< long long >( std::floor( ( frameStart - mTemporalExtents.begin() ).seconds() / mFrameDuration.seconds() ) );
}
roughFrameEnd = roughFrameStart + 100; // just in case we miss the guess
}
Expand Down

0 comments on commit a1f47a4

Please sign in to comment.