comparison layer/RegionLayer.cpp @ 989:3871dffc31bd

Fix a number of warnings in the 32-bit build
author Chris Cannam
date Wed, 01 Jul 2015 15:53:54 +0100
parents 251dd0abc7b7
children 2adca8f05583
comparison
equal deleted inserted replaced
974:6645b6b8356f 989:3871dffc31bd
304 RegionModel::PointList 304 RegionModel::PointList
305 RegionLayer::getLocalPoints(View *v, int x) const 305 RegionLayer::getLocalPoints(View *v, int x) const
306 { 306 {
307 if (!m_model) return RegionModel::PointList(); 307 if (!m_model) return RegionModel::PointList();
308 308
309 long frame = v->getFrameForX(x); 309 sv_frame_t frame = v->getFrameForX(x);
310 310
311 RegionModel::PointList onPoints = 311 RegionModel::PointList onPoints =
312 m_model->getPoints(frame); 312 m_model->getPoints(frame);
313 313
314 if (!onPoints.empty()) { 314 if (!onPoints.empty()) {
347 bool 347 bool
348 RegionLayer::getPointToDrag(View *v, int x, int y, RegionModel::Point &p) const 348 RegionLayer::getPointToDrag(View *v, int x, int y, RegionModel::Point &p) const
349 { 349 {
350 if (!m_model) return false; 350 if (!m_model) return false;
351 351
352 long frame = v->getFrameForX(x); 352 sv_frame_t frame = v->getFrameForX(x);
353 353
354 RegionModel::PointList onPoints = m_model->getPoints(frame); 354 RegionModel::PointList onPoints = m_model->getPoints(frame);
355 if (onPoints.empty()) return false; 355 if (onPoints.empty()) return false;
356 356
357 int nearestDistance = -1; 357 int nearestDistance = -1;
1123 void 1123 void
1124 RegionLayer::drawStart(View *v, QMouseEvent *e) 1124 RegionLayer::drawStart(View *v, QMouseEvent *e)
1125 { 1125 {
1126 if (!m_model) return; 1126 if (!m_model) return;
1127 1127
1128 long frame = v->getFrameForX(e->x()); 1128 sv_frame_t frame = v->getFrameForX(e->x());
1129 if (frame < 0) frame = 0; 1129 if (frame < 0) frame = 0;
1130 frame = frame / m_model->getResolution() * m_model->getResolution(); 1130 frame = frame / m_model->getResolution() * m_model->getResolution();
1131 1131
1132 double value = getValueForY(v, e->y()); 1132 double value = getValueForY(v, e->y());
1133 1133
1261 int xdist = e->x() - m_dragStartX; 1261 int xdist = e->x() - m_dragStartX;
1262 int ydist = e->y() - m_dragStartY; 1262 int ydist = e->y() - m_dragStartY;
1263 int newx = m_dragPointX + xdist; 1263 int newx = m_dragPointX + xdist;
1264 int newy = m_dragPointY + ydist; 1264 int newy = m_dragPointY + ydist;
1265 1265
1266 long frame = v->getFrameForX(newx); 1266 sv_frame_t frame = v->getFrameForX(newx);
1267 if (frame < 0) frame = 0; 1267 if (frame < 0) frame = 0;
1268 frame = frame / m_model->getResolution() * m_model->getResolution(); 1268 frame = frame / m_model->getResolution() * m_model->getResolution();
1269 1269
1270 // Do not bisect between two values, if one of those values is 1270 // Do not bisect between two values, if one of those values is
1271 // that of the point we're actually moving ... 1271 // that of the point we're actually moving ...