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

Mikko Rapeli mikko.rapeli at iki.fi
Sun Aug 28 10:25:05 UTC 2011


Found by cppcheck.
---
 src/timecode.cpp |    4 ++--
 src/timecode.h   |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/timecode.cpp b/src/timecode.cpp
index 5e68e0d..89063dd 100644
--- a/src/timecode.cpp
+++ b/src/timecode.cpp
@@ -137,13 +137,13 @@ QString Timecode::reformatSeparators(QString duration) const
     return duration.replace(8, 1, ':');
 }
 
-int Timecode::getDisplayFrameCount(const QString duration, bool frameDisplay) const
+int Timecode::getDisplayFrameCount(const QString &duration, bool frameDisplay) const
 {
     if (frameDisplay) return duration.toInt();
     return getFrameCount(duration);
 }
 
-int Timecode::getFrameCount(const QString duration) const
+int Timecode::getFrameCount(const QString &duration) const
 {
     if (m_dropFrameTimecode) {
 
diff --git a/src/timecode.h b/src/timecode.h
index e1ae7cb..7c2d269 100644
--- a/src/timecode.h
+++ b/src/timecode.h
@@ -50,8 +50,8 @@ public:
     /** Returns the timecode for a given time */
     QString getDisplayTimecode(const GenTime & time, bool frameDisplay) const;
     QString getTimecode(const GenTime & time) const;
-    int getDisplayFrameCount(const QString duration, bool frameDisplay) const;
-    int getFrameCount(const QString duration) const;
+    int getDisplayFrameCount(const QString &duration, bool frameDisplay) const;
+    int getFrameCount(const QString &duration) const;
     static QString getEasyTimecode(const GenTime & time, const double &fps);
     static QString getStringTimecode(int frames, const double &fps);
     const QString getDisplayTimecodeFromFrames(int frames, bool frameDisplay) const;
-- 
1.7.5.4





More information about the Kdenlive mailing list