Mercurial > hg > svgui
diff layer/NoteLayer.cpp @ 806:4c8ca536b54f warnfix_no_size_t
Some more unsigned/long removal
author | Chris Cannam |
---|---|
date | Tue, 17 Jun 2014 15:36:56 +0100 |
parents | 1d526ba11a24 |
children | 0f5961c1bb6c |
line wrap: on
line diff
--- a/layer/NoteLayer.cpp Tue Jun 17 15:18:06 2014 +0100 +++ b/layer/NoteLayer.cpp Tue Jun 17 15:36:56 2014 +0100 @@ -389,7 +389,7 @@ { if (!m_model) return NoteModel::PointList(); - long frame = v->getFrameForX(x); + int frame = v->getFrameForX(x); NoteModel::PointList onPoints = m_model->getPoints(frame); @@ -407,11 +407,11 @@ if (prevPoints.empty()) { usePoints = nextPoints; - } else if (long(prevPoints.begin()->frame) < v->getStartFrame() && + } else if (int(prevPoints.begin()->frame) < v->getStartFrame() && !(nextPoints.begin()->frame > v->getEndFrame())) { usePoints = nextPoints; - } else if (long(nextPoints.begin()->frame) - frame < - frame - long(prevPoints.begin()->frame)) { + } else if (int(nextPoints.begin()->frame) - frame < + frame - int(prevPoints.begin()->frame)) { usePoints = nextPoints; } @@ -432,7 +432,7 @@ { if (!m_model) return false; - long frame = v->getFrameForX(x); + int frame = v->getFrameForX(x); NoteModel::PointList onPoints = m_model->getPoints(frame); if (onPoints.empty()) return false; @@ -747,8 +747,8 @@ // Profiler profiler("NoteLayer::paint", true); int x0 = rect.left(), x1 = rect.right(); - long frame0 = v->getFrameForX(x0); - long frame1 = v->getFrameForX(x1); + int frame0 = v->getFrameForX(x0); + int frame1 = v->getFrameForX(x1); NoteModel::PointList points(m_model->getPoints(frame0, frame1)); if (points.empty()) return; @@ -884,7 +884,7 @@ if (!m_model) return; - long frame = v->getFrameForX(e->x()); + int frame = v->getFrameForX(e->x()); if (frame < 0) frame = 0; frame = frame / m_model->getResolution() * m_model->getResolution(); @@ -908,14 +908,14 @@ if (!m_model || !m_editing) return; - long frame = v->getFrameForX(e->x()); + int frame = v->getFrameForX(e->x()); if (frame < 0) frame = 0; frame = frame / m_model->getResolution() * m_model->getResolution(); float newValue = getValueForY(v, e->y()); - long newFrame = m_editingPoint.frame; - long newDuration = frame - newFrame; + int newFrame = m_editingPoint.frame; + int newDuration = frame - newFrame; if (newDuration < 0) { newFrame = frame; newDuration = -newDuration; @@ -1015,7 +1015,7 @@ int newx = m_dragPointX + xdist; int newy = m_dragPointY + ydist; - long frame = v->getFrameForX(newx); + int frame = v->getFrameForX(newx); if (frame < 0) frame = 0; frame = frame / m_model->getResolution() * m_model->getResolution(); @@ -1288,13 +1288,13 @@ } void -NoteLayer::addNoteOn(long frame, int pitch, int velocity) +NoteLayer::addNoteOn(int frame, int pitch, int velocity) { m_pendingNoteOns.insert(Note(frame, pitch, 0, float(velocity) / 127.0, "")); } void -NoteLayer::addNoteOff(long frame, int pitch) +NoteLayer::addNoteOff(int frame, int pitch) { for (NoteSet::iterator i = m_pendingNoteOns.begin(); i != m_pendingNoteOns.end(); ++i) {