]> git.sesse.net Git - kdenlive/blobdiff - src/jogshuttle.cpp
Minor optimization
[kdenlive] / src / jogshuttle.cpp
index 04ee736082d3923942696297196f4998975d63e0..36ea3cd0fb13dbfa193fe03471c1bdbe814e278c 100644 (file)
@@ -68,7 +68,7 @@
 #define JOG_STOP 10020
 #define MAX_SHUTTLE_RANGE 7
 
-void ShuttleThread::init(QObject *parent, QString device)
+void ShuttleThread::init(QObject *parent, const QString &device)
 {
     m_parent = parent;
     m_device = device;
@@ -105,7 +105,7 @@ void ShuttleThread::run()
        fd_set             readset;
        struct timeval timeout;
 
-       int num_warnings, readResult = 0;
+       int num_warnings = 0, readResult = 0;
        int result, iof = -1;
 
        /* get fd settings */
@@ -265,7 +265,7 @@ void ShuttleThread::jog(unsigned int value)
 }
 
 
-JogShuttle::JogShuttle(QString device, QObject *parent) :
+JogShuttle::JogShuttle(const QString &device, QObject *parent) :
         QObject(parent)
 {
     initDevice(device);
@@ -276,7 +276,7 @@ JogShuttle::~JogShuttle()
        stopDevice();
 }
 
-void JogShuttle::initDevice(QString device)
+void JogShuttle::initDevice(const QString &device)
 {
     if (m_shuttleProcess.isRunning()) {
         if (device == m_shuttleProcess.m_device) return;
@@ -332,3 +332,5 @@ void JogShuttle::customEvent(QEvent* e)
 
 // #include "jogshuttle.moc"
 
+
+#include "jogshuttle.moc"