Commit 34be1b01 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix compile warnings

parent 8a736c34
...@@ -2739,8 +2739,8 @@ int TimelineModel::getNextSnapPos(int pos, std::vector<size_t> &snaps) ...@@ -2739,8 +2739,8 @@ int TimelineModel::getNextSnapPos(int pos, std::vector<size_t> &snaps)
// sort snaps // sort snaps
std::sort(snaps.begin(), snaps.end()); std::sort(snaps.begin(), snaps.end());
for (auto i : snaps) { for (auto i : snaps) {
if (i > pos) { if ((int)i > pos) {
return i; return (int) i;
} }
} }
return pos; return pos;
...@@ -2774,8 +2774,8 @@ int TimelineModel::getPreviousSnapPos(int pos, std::vector<size_t> &snaps) ...@@ -2774,8 +2774,8 @@ int TimelineModel::getPreviousSnapPos(int pos, std::vector<size_t> &snaps)
// sort descending // sort descending
std::reverse(snaps.begin(),snaps.end()); std::reverse(snaps.begin(),snaps.end());
for (auto i : snaps) { for (auto i : snaps) {
if (i < pos) { if ((int)i < pos) {
return i; return (int)i;
} }
} }
return 0; return 0;
......
...@@ -686,8 +686,8 @@ void TimelineController::gotoNextSnap() ...@@ -686,8 +686,8 @@ void TimelineController::gotoNextSnap()
m_snapStackIndex = pCore->undoIndex(); m_snapStackIndex = pCore->undoIndex();
m_activeSnaps.clear(); m_activeSnaps.clear();
m_activeSnaps = pCore->projectManager()->current()->getGuideModel()->getSnapPoints(); m_activeSnaps = pCore->projectManager()->current()->getGuideModel()->getSnapPoints();
m_activeSnaps.push_back(m_zone.x()); m_activeSnaps.push_back((size_t)m_zone.x());
m_activeSnaps.push_back(m_zone.y() - 1); m_activeSnaps.push_back((size_t)(m_zone.y() - 1));
} }
int nextSnap = m_model->getNextSnapPos(pCore->getTimelinePosition(), m_activeSnaps); int nextSnap = m_model->getNextSnapPos(pCore->getTimelinePosition(), m_activeSnaps);
if (nextSnap > pCore->getTimelinePosition()) { if (nextSnap > pCore->getTimelinePosition()) {
...@@ -702,8 +702,8 @@ void TimelineController::gotoPreviousSnap() ...@@ -702,8 +702,8 @@ void TimelineController::gotoPreviousSnap()
m_snapStackIndex = pCore->undoIndex(); m_snapStackIndex = pCore->undoIndex();
m_activeSnaps.clear(); m_activeSnaps.clear();
m_activeSnaps = pCore->projectManager()->current()->getGuideModel()->getSnapPoints(); m_activeSnaps = pCore->projectManager()->current()->getGuideModel()->getSnapPoints();
m_activeSnaps.push_back(m_zone.x()); m_activeSnaps.push_back((size_t)m_zone.x());
m_activeSnaps.push_back(m_zone.y() - 1); m_activeSnaps.push_back((size_t)(m_zone.y() - 1));
} }
setPosition(m_model->getPreviousSnapPos(pCore->getTimelinePosition(), m_activeSnaps)); 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