]> git.sesse.net Git - kdenlive/blobdiff - src/onmonitoritems/onmonitorpathitem.cpp
Better to use ++i than i++ (minor optimization)
[kdenlive] / src / onmonitoritems / onmonitorpathitem.cpp
index 4296cd7cd6e9a7327a2fcae35456a9551bec24b0..3db6d43623443c7588039eab7348274f9787de74 100644 (file)
@@ -70,7 +70,7 @@ void OnMonitorPathItem::rebuildShape() {
        shape.addRect(r);
        
        p.moveTo(m_points.at(0));
-       for (int i = 1; i < m_points.count(); i++) {
+       for (int i = 1; i < m_points.count(); ++i) {
            p.lineTo(m_points.at(i));
            r.moveCenter(m_points.at(i));
            shape.addRect(r);
@@ -88,7 +88,7 @@ void OnMonitorPathItem::getMode(QPointF pos)
         dist /= m_view->matrix().m11();
     }
     // Item mapped coordinates
-    for (int i = 0; i < m_points.count(); i++) {
+    for (int i = 0; i < m_points.count(); ++i) {
        if ((pos - m_points.at(i)).manhattanLength() <= dist) {
            m_activePoint = i;
            return;
@@ -182,7 +182,7 @@ void OnMonitorPathItem::paint(QPainter* painter, const QStyleOptionGraphicsItem*
     }
 
     QRectF handle(0, 0, w, h);
-    for (int i = 0; i < m_points.count(); i++) {
+    for (int i = 0; i < m_points.count(); ++i) {
        handle.moveCenter(m_points.at(i));
         painter->fillRect(handle, m_activePoint == i ? Qt::blue : pen().color());
     }