X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcustomtrackscene.cpp;h=cf5dffde29a28ccc04f7ac2877e6bb3e8dfe755b;hb=7effb944762e06530bf3fb826c6dde064a27d436;hp=1f8b40ae2f6de2f45f5e8483aa7c1a149b886aa7;hpb=5aa1199079acf6eaf504803df910b31aa3b288ae;p=kdenlive diff --git a/src/customtrackscene.cpp b/src/customtrackscene.cpp index 1f8b40ae..cf5dffde 100644 --- a/src/customtrackscene.cpp +++ b/src/customtrackscene.cpp @@ -44,18 +44,19 @@ double CustomTrackScene::getSnapPointForPos(double pos, bool doSnap) if (qAbs((int)(pos - m_snapPoints.at(i).frames(m_document->fps()))) < maximumOffset) { return m_snapPoints.at(i).frames(m_document->fps()); } - if (m_snapPoints.at(i).frames(m_document->fps()) > pos) break; + if (m_snapPoints.at(i).frames(m_document->fps()) > pos) + break; } } return GenTime(pos, m_document->fps()).frames(m_document->fps()); } -void CustomTrackScene::setSnapList(QList snaps) +void CustomTrackScene::setSnapList(const QList & snaps) { m_snapPoints = snaps; } -GenTime CustomTrackScene::previousSnapPoint(GenTime pos) const +GenTime CustomTrackScene::previousSnapPoint(const GenTime &pos) const { for (int i = 0; i < m_snapPoints.size(); ++i) { if (m_snapPoints.at(i) >= pos) { @@ -66,7 +67,7 @@ GenTime CustomTrackScene::previousSnapPoint(GenTime pos) const return GenTime(); } -GenTime CustomTrackScene::nextSnapPoint(GenTime pos) const +GenTime CustomTrackScene::nextSnapPoint(const GenTime &pos) const { for (int i = 0; i < m_snapPoints.size(); ++i) { if (m_snapPoints.at(i) > pos) {