Allow for checking if the TimingData is empty.
AKA, no segments in use. Again, this is mainly for the editor. As for why a lowercase empty? Blame vectors.
This commit is contained in:
@@ -17,6 +17,18 @@ TimingData::~TimingData()
|
||||
{
|
||||
}
|
||||
|
||||
bool TimingData::empty() const
|
||||
{
|
||||
for (unsigned i = 0; i < NUM_TimingSegmentType; i++)
|
||||
{
|
||||
for (unsigned j = 0; j < this->allTimingSegments[i].size(); j++)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
TimingData TimingData::CopyRange(int startRow, int endRow)
|
||||
{
|
||||
TimingData tmp;
|
||||
|
||||
@@ -45,6 +45,8 @@ public:
|
||||
return this->GetPreviousSegmentBeatAtRow(tst, BeatToNoteRow(beat), isDelay);
|
||||
}
|
||||
|
||||
bool empty() const;
|
||||
|
||||
/**
|
||||
* @brief Sets up initial timing data with a defined offset.
|
||||
* @param fOffset the offset from the 0th beat. */
|
||||
|
||||
Reference in New Issue
Block a user