summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <[email protected]>2016-03-20 18:47:44 +0100
committerDennis Nienhüser <[email protected]>2016-03-20 18:47:44 +0100
commit506edd0d39f0f6588a40438a7860a0fe73e2e4ca (patch)
treea73c0ab64febd8b6b67d072177623f2627caecc0
parent17087790dd3feb68bcb3c7078526149cfdc9d65e (diff)
Reduce variable scope (cppcheck)
-rw-r--r--src/lib/marble/RouteSimulationPositionProviderPlugin.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/marble/RouteSimulationPositionProviderPlugin.cpp b/src/lib/marble/RouteSimulationPositionProviderPlugin.cpp
index 0209071..124d990 100644
--- a/src/lib/marble/RouteSimulationPositionProviderPlugin.cpp
+++ b/src/lib/marble/RouteSimulationPositionProviderPlugin.cpp
@@ -147,8 +147,6 @@ QDateTime RouteSimulationPositionProviderPlugin::timestamp() const
void RouteSimulationPositionProviderPlugin::update()
{
- bool isCurrentIndexValid = true;
-
if ( m_currentIndex >= 0 && m_currentIndex < m_lineStringInterpolated.size() ) {
if ( m_status != PositionProviderStatusAvailable ) {
m_status = PositionProviderStatusAvailable;
@@ -211,6 +209,7 @@ void RouteSimulationPositionProviderPlugin::update()
newPosition=newPoint;
}
else if ( fraction > 1 ) {
+ bool isCurrentIndexValid = true;
while ( fraction > 1 ) {
++m_currentIndex;
if ( m_currentIndex >= m_lineStringInterpolated.size() ) {