comparison layer/TimeInstantLayer.cpp @ 805:1d526ba11a24 warnfix_no_size_t

Remove size_t's and fix warnings in layer/
author Chris Cannam
date Tue, 17 Jun 2014 15:18:06 +0100
parents 1a0dfcbffaf1
children 4a578a360011
comparison
equal deleted inserted replaced
782:ddae586bc47b 805:1d526ba11a24
199 199
200 return usePoints; 200 return usePoints;
201 } 201 }
202 202
203 QString 203 QString
204 TimeInstantLayer::getLabelPreceding(size_t frame) const 204 TimeInstantLayer::getLabelPreceding(int frame) const
205 { 205 {
206 if (!m_model) return ""; 206 if (!m_model) return "";
207 SparseOneDimensionalModel::PointList points = m_model->getPreviousPoints(frame); 207 SparseOneDimensionalModel::PointList points = m_model->getPreviousPoints(frame);
208 for (SparseOneDimensionalModel::PointList::const_iterator i = points.begin(); 208 for (SparseOneDimensionalModel::PointList::const_iterator i = points.begin();
209 i != points.end(); ++i) { 209 i != points.end(); ++i) {
248 return text; 248 return text;
249 } 249 }
250 250
251 bool 251 bool
252 TimeInstantLayer::snapToFeatureFrame(View *v, int &frame, 252 TimeInstantLayer::snapToFeatureFrame(View *v, int &frame,
253 size_t &resolution, 253 int &resolution,
254 SnapType snap) const 254 SnapType snap) const
255 { 255 {
256 if (!m_model) { 256 if (!m_model) {
257 return Layer::snapToFeatureFrame(v, frame, resolution, snap); 257 return Layer::snapToFeatureFrame(v, frame, resolution, snap);
258 } 258 }
504 m_editingPoint.frame = frame; 504 m_editingPoint.frame = frame;
505 m_editingCommand->addPoint(m_editingPoint); 505 m_editingCommand->addPoint(m_editingPoint);
506 } 506 }
507 507
508 void 508 void
509 TimeInstantLayer::drawEnd(View *, QMouseEvent *e) 509 TimeInstantLayer::drawEnd(View *, QMouseEvent *)
510 { 510 {
511 #ifdef DEBUG_TIME_INSTANT_LAYER 511 #ifdef DEBUG_TIME_INSTANT_LAYER
512 cerr << "TimeInstantLayer::drawEnd(" << e->x() << ")" << endl; 512 cerr << "TimeInstantLayer::drawEnd(" << e->x() << ")" << endl;
513 #endif 513 #endif
514 if (!m_model || !m_editing) return; 514 if (!m_model || !m_editing) return;
539 539
540 m_editing = true; 540 m_editing = true;
541 } 541 }
542 542
543 void 543 void
544 TimeInstantLayer::eraseDrag(View *v, QMouseEvent *e) 544 TimeInstantLayer::eraseDrag(View *, QMouseEvent *)
545 { 545 {
546 } 546 }
547 547
548 void 548 void
549 TimeInstantLayer::eraseEnd(View *v, QMouseEvent *e) 549 TimeInstantLayer::eraseEnd(View *v, QMouseEvent *e)
610 m_editingPoint.frame = frame; 610 m_editingPoint.frame = frame;
611 m_editingCommand->addPoint(m_editingPoint); 611 m_editingCommand->addPoint(m_editingPoint);
612 } 612 }
613 613
614 void 614 void
615 TimeInstantLayer::editEnd(View *, QMouseEvent *e) 615 TimeInstantLayer::editEnd(View *, QMouseEvent *)
616 { 616 {
617 #ifdef DEBUG_TIME_INSTANT_LAYER 617 #ifdef DEBUG_TIME_INSTANT_LAYER
618 cerr << "TimeInstantLayer::editEnd(" << e->x() << ")" << endl; 618 cerr << "TimeInstantLayer::editEnd(" << e->x() << ")" << endl;
619 #endif 619 #endif
620 if (!m_model || !m_editing) return; 620 if (!m_model || !m_editing) return;
664 delete dialog; 664 delete dialog;
665 return true; 665 return true;
666 } 666 }
667 667
668 void 668 void
669 TimeInstantLayer::moveSelection(Selection s, size_t newStartFrame) 669 TimeInstantLayer::moveSelection(Selection s, int newStartFrame)
670 { 670 {
671 if (!m_model) return; 671 if (!m_model) return;
672 672
673 SparseOneDimensionalModel::EditCommand *command = 673 SparseOneDimensionalModel::EditCommand *command =
674 new SparseOneDimensionalModel::EditCommand(m_model, 674 new SparseOneDimensionalModel::EditCommand(m_model,
796 for (Clipboard::PointList::const_iterator i = points.begin(); 796 for (Clipboard::PointList::const_iterator i = points.begin();
797 i != points.end(); ++i) { 797 i != points.end(); ++i) {
798 798
799 if (!i->haveFrame()) continue; 799 if (!i->haveFrame()) continue;
800 800
801 size_t frame = 0; 801 int frame = 0;
802 802
803 if (!realign) { 803 if (!realign) {
804 804
805 frame = i->getFrame(); 805 frame = i->getFrame();
806 806