summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanjiban Bairagya <[email protected]>2016-07-03 02:16:05 +0530
committerSanjiban Bairagya <[email protected]>2016-07-03 02:16:36 +0530
commit88ac365237ac4919fec989609f46b41e98f3dd76 (patch)
tree116a2b4102015e320e5d457c4b9d4b9879d9ef7d
parent9e0ebe517d1a0e3af64c1373439b2cbf804fc49e (diff)
No need to declare extra variable when it is used only once
-rw-r--r--src/lib/marble/routing/VoiceNavigationModel.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/marble/routing/VoiceNavigationModel.cpp b/src/lib/marble/routing/VoiceNavigationModel.cpp
index 68485bd..4a621f8 100644
--- a/src/lib/marble/routing/VoiceNavigationModel.cpp
+++ b/src/lib/marble/routing/VoiceNavigationModel.cpp
@@ -150,9 +150,8 @@ QString VoiceNavigationModelPrivate::turnTypeAudioFile( Maneuver::Direction turn
QString VoiceNavigationModelPrivate::announcementText( Maneuver::Direction turnType, qreal distance )
{
- bool const announce = distance >= 75;
QString announcementText = QString("");
- if (announce) {
+ if (distance >= 75) {
announcementText = QString("In "+distanceAudioFile(distance)+" meters, ");
}
switch (turnType) {