Skip to content

Commit

Permalink
Mark method as const
Browse files Browse the repository at this point in the history
(cherry picked from commit 8c45aad)
  • Loading branch information
nyalldawson committed Nov 20, 2020
1 parent 658e81f commit 77b9937
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -169,7 +169,7 @@ Returns the animation temporal range cumulative settings.
.. seealso:: :py:func:`setTemporalRangeCumulative` .. seealso:: :py:func:`setTemporalRangeCumulative`
%End %End


long long totalFrameCount(); long long totalFrameCount() const;
%Docstring %Docstring
Returns the total number of frames for the navigation. Returns the total number of frames for the navigation.
%End %End
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgstemporalnavigationobject.cpp
Expand Up @@ -288,7 +288,7 @@ void QgsTemporalNavigationObject::skipToEnd()
setCurrentFrameNumber( frame ); setCurrentFrameNumber( frame );
} }


long long QgsTemporalNavigationObject::totalFrameCount() long long QgsTemporalNavigationObject::totalFrameCount() const
{ {
QgsInterval totalAnimationLength = mTemporalExtents.end() - mTemporalExtents.begin(); QgsInterval totalAnimationLength = mTemporalExtents.end() - mTemporalExtents.begin();
return std::floor( totalAnimationLength.seconds() / mFrameDuration.seconds() ) + 1; return std::floor( totalAnimationLength.seconds() / mFrameDuration.seconds() ) + 1;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgstemporalnavigationobject.h
Expand Up @@ -187,7 +187,7 @@ class CORE_EXPORT QgsTemporalNavigationObject : public QgsTemporalController, pu
/** /**
* Returns the total number of frames for the navigation. * Returns the total number of frames for the navigation.
*/ */
long long totalFrameCount(); long long totalFrameCount() const;


/** /**
* Returns TRUE if the animation should loop after hitting the end or start frame. * Returns TRUE if the animation should loop after hitting the end or start frame.
Expand Down

0 comments on commit 77b9937

Please sign in to comment.