X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcustomtrackscene.cpp;h=cf5dffde29a28ccc04f7ac2877e6bb3e8dfe755b;hb=c3302003093710ee247ad84c0fe2ef3c579d417f;hp=ba243695662e66e75c014ea529fa097e65dfdfc6;hpb=ff57a79c5515bf467bdd6abf0e011549a96d98e2;p=kdenlive diff --git a/src/customtrackscene.cpp b/src/customtrackscene.cpp index ba243695..cf5dffde 100644 --- a/src/customtrackscene.cpp +++ b/src/customtrackscene.cpp @@ -44,7 +44,8 @@ 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()); @@ -55,7 +56,7 @@ 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) {