]> git.sesse.net Git - kdenlive/blobdiff - src/onmonitoritems/onmonitorpathitem.cpp
const'ify. Remove unimplemented function. Fix indent. Optimization
[kdenlive] / src / onmonitoritems / onmonitorpathitem.cpp
index 3db6d43623443c7588039eab7348274f9787de74..c3b79df524fbeb6cd08d452f4b14f56afb573fd7 100644 (file)
@@ -59,7 +59,8 @@ void OnMonitorPathItem::setPoints(Mlt::Geometry *geometry)
     rebuildShape();
 }
 
-void OnMonitorPathItem::rebuildShape() {
+void OnMonitorPathItem::rebuildShape()
+{
     if (m_activePoint > m_points.count()) m_activePoint = -1;
     QPainterPath p;
     QPainterPath shape;
@@ -81,7 +82,7 @@ void OnMonitorPathItem::rebuildShape() {
     setPath(p);
 }
 
-void OnMonitorPathItem::getMode(QPointF pos)
+void OnMonitorPathItem::getMode(const QPointF &pos)
 {
     double dist  = 8;
     if (getView()) {
@@ -193,8 +194,8 @@ bool OnMonitorPathItem::getView()
     if (m_view)
         return true;
 
-    if (scene() && scene()->views().count()) {
-        m_view = scene()->views()[0];
+    if (scene() && !scene()->views().isEmpty()) {
+        m_view = scene()->views().first();
         return true;
     } else {
         return false;