Mercurial > hg > svcore
comparison data/model/SparseOneDimensionalModel.h @ 1038:cc27f35aa75c cxx11
Introducing the signed 64-bit frame index type, and fixing build failures from inclusion of -Wconversion with -Werror. Not finished yet.
author | Chris Cannam |
---|---|
date | Tue, 03 Mar 2015 15:18:24 +0000 |
parents | 59e7fe1b1003 |
children | a1cd5abcb38b |
comparison
equal
deleted
inserted
replaced
1037:bf0e5944289b | 1038:cc27f35aa75c |
---|---|
24 #include <QStringList> | 24 #include <QStringList> |
25 | 25 |
26 struct OneDimensionalPoint | 26 struct OneDimensionalPoint |
27 { | 27 { |
28 public: | 28 public: |
29 OneDimensionalPoint(int _frame) : frame(_frame) { } | 29 OneDimensionalPoint(sv_frame_t _frame) : frame(_frame) { } |
30 OneDimensionalPoint(int _frame, QString _label) : frame(_frame), label(_label) { } | 30 OneDimensionalPoint(sv_frame_t _frame, QString _label) : frame(_frame), label(_label) { } |
31 | 31 |
32 int getDimensions() const { return 1; } | 32 int getDimensions() const { return 1; } |
33 | 33 |
34 int frame; | 34 sv_frame_t frame; |
35 QString label; | 35 QString label; |
36 | 36 |
37 QString getLabel() const { return label; } | 37 QString getLabel() const { return label; } |
38 | 38 |
39 void toXml(QTextStream &stream, | 39 void toXml(QTextStream &stream, |
185 | 185 |
186 NoteList getNotes() const { | 186 NoteList getNotes() const { |
187 return getNotesWithin(getStartFrame(), getEndFrame()); | 187 return getNotesWithin(getStartFrame(), getEndFrame()); |
188 } | 188 } |
189 | 189 |
190 NoteList getNotesWithin(int startFrame, int endFrame) const { | 190 NoteList getNotesWithin(sv_frame_t startFrame, sv_frame_t endFrame) const { |
191 | 191 |
192 PointList points = getPoints(startFrame, endFrame); | 192 PointList points = getPoints(startFrame, endFrame); |
193 NoteList notes; | 193 NoteList notes; |
194 | 194 |
195 for (PointList::iterator pli = | 195 for (PointList::iterator pli = |