Fix compile warnings

parent 8a736c34
......@@ -2739,8 +2739,8 @@ int TimelineModel::getNextSnapPos(int pos, std::vector<size_t> &snaps)
// sort snaps
std::sort(snaps.begin(), snaps.end());
for (auto i : snaps) {
if (i > pos) {
return i;
if ((int)i > pos) {
return (int) i;
}
}
return pos;
......@@ -2774,8 +2774,8 @@ int TimelineModel::getPreviousSnapPos(int pos, std::vector<size_t> &snaps)
// sort descending
std::reverse(snaps.begin(),snaps.end());
for (auto i : snaps) {
if (i < pos) {
return i;
if ((int)i < pos) {
return (int)i;
}
}
return 0;
......
......@@ -686,8 +686,8 @@ void TimelineController::gotoNextSnap()
m_snapStackIndex = pCore->undoIndex();
m_activeSnaps.clear();
m_activeSnaps = pCore->projectManager()->current()->getGuideModel()->getSnapPoints();
m_activeSnaps.push_back(m_zone.x());
m_activeSnaps.push_back(m_zone.y() - 1);
m_activeSnaps.push_back((size_t)m_zone.x());
m_activeSnaps.push_back((size_t)(m_zone.y() - 1));
}
int nextSnap = m_model->getNextSnapPos(pCore->getTimelinePosition(), m_activeSnaps);
if (nextSnap > pCore->getTimelinePosition()) {
......@@ -702,8 +702,8 @@ void TimelineController::gotoPreviousSnap()
m_snapStackIndex = pCore->undoIndex();
m_activeSnaps.clear();
m_activeSnaps = pCore->projectManager()->current()->getGuideModel()->getSnapPoints();
m_activeSnaps.push_back(m_zone.x());
m_activeSnaps.push_back(m_zone.y() - 1);
m_activeSnaps.push_back((size_t)m_zone.x());
m_activeSnaps.push_back((size_t)(m_zone.y() - 1));
}
setPosition(m_model->getPreviousSnapPos(pCore->getTimelinePosition(), m_activeSnaps));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment