[Kdenlive-devel] [PATCH kdenlive 16/27] const parameter as reference

Mikko Rapeli mikko.rapeli at iki.fi
Sun Aug 28 10:24:56 UTC 2011


Found by cppcheck.
---
 src/guide.cpp      |    2 +-
 src/guide.h        |    2 +-
 src/mainwindow.cpp |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/guide.cpp b/src/guide.cpp
index 9c92236..47ba15e 100644
--- a/src/guide.cpp
+++ b/src/guide.cpp
@@ -70,7 +70,7 @@ CommentedTime Guide::info() const
     return CommentedTime(m_position, m_label);
 }
 
-void Guide::updateGuide(const GenTime newPos, const QString &comment)
+void Guide::updateGuide(const GenTime &newPos, const QString &comment)
 {
     m_position = newPos;
     setPos(m_position.frames(m_view->fps()), 0);
diff --git a/src/guide.h b/src/guide.h
index 1265d13..bcedf3a 100644
--- a/src/guide.h
+++ b/src/guide.h
@@ -36,7 +36,7 @@ class Guide : public QGraphicsLineItem
 public:
     Guide(CustomTrackView *view, GenTime pos, QString label, double height);
     GenTime position() const;
-    void updateGuide(const GenTime newPos, const QString &comment = QString());
+    void updateGuide(const GenTime &newPos, const QString &comment = QString());
     QString label() const;
     CommentedTime info() const;
     void updatePos();
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 4b534f6..ae32c9b 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -2495,7 +2495,7 @@ void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc)   //cha
 
     connect(doc, SIGNAL(docModified(bool)), this, SLOT(slotUpdateDocumentState(bool)));
     connect(doc, SIGNAL(guidesUpdated()), this, SLOT(slotGuidesUpdated()));
-    connect(doc, SIGNAL(saveTimelinePreview(const QString)), trackView, SLOT(slotSaveTimelinePreview(const QString)));
+    connect(doc, SIGNAL(saveTimelinePreview(const QString &)), trackView, SLOT(slotSaveTimelinePreview(const QString)));
     
     connect(m_notesWidget, SIGNAL(textChanged()), doc, SLOT(setModified()));
 
-- 
1.7.5.4





More information about the Kdenlive mailing list