summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-10-22 13:38:33 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-11-05 16:47:11 (GMT)
commit4b66ae4ff8ab925faf0fa0b11ff8a667570c1103 (patch)
tree067c1a08d2274b5b36275ba98d8dde3744b9c9a3
parentff43bd553b58db2928acae9e5cee1ceef0d48152 (diff)
Minor performance improvements (cppcheck)
-rw-r--r--src/lib/marble/cloudsync/ConflictDialog.cpp5
-rw-r--r--src/lib/marble/routing/VoiceNavigationModel.cpp4
2 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/marble/cloudsync/ConflictDialog.cpp b/src/lib/marble/cloudsync/ConflictDialog.cpp
index 8a03384..7ab2450 100644
--- a/src/lib/marble/cloudsync/ConflictDialog.cpp
+++ b/src/lib/marble/cloudsync/ConflictDialog.cpp
@@ -25,9 +25,10 @@ namespace Marble {
ConflictDialog::ConflictDialog( QWidget *parent ) :
QDialog( parent ),
m_mergeItem( 0 ),
- m_box( 0 )
+ m_box( 0 ),
+ m_resolveAction(ConflictDialog::AskUser)
{
- m_resolveAction = ConflictDialog::AskUser;
+ // nothing to do
}
void ConflictDialog::setMergeItem( MergeItem *item )
diff --git a/src/lib/marble/routing/VoiceNavigationModel.cpp b/src/lib/marble/routing/VoiceNavigationModel.cpp
index f8ebfa7..d156327 100644
--- a/src/lib/marble/routing/VoiceNavigationModel.cpp
+++ b/src/lib/marble/routing/VoiceNavigationModel.cpp
@@ -75,7 +75,7 @@ public:
QString announcementText( Maneuver::Direction turnType, qreal distance );
- void updateInstruction( RouteSegment segment, qreal distance, Maneuver::Direction turnType );
+ void updateInstruction(const RouteSegment &segment, qreal distance, Maneuver::Direction turnType );
void updateInstruction( const QString &name );
@@ -214,7 +214,7 @@ QString VoiceNavigationModelPrivate::announcementText( Maneuver::Direction turnT
return announcementText;
}
-void VoiceNavigationModelPrivate::updateInstruction( RouteSegment segment, qreal distance, Maneuver::Direction turnType )
+void VoiceNavigationModelPrivate::updateInstruction( const RouteSegment & segment, qreal distance, Maneuver::Direction turnType )
{
QString turnTypeAudio = turnTypeAudioFile( turnType, distance );
if ( turnTypeAudio.isEmpty() ) {