NOOP, re-indent & whitespace
This commit is contained in:
parent
33db3c854d
commit
621e92f268
@ -56,14 +56,16 @@ public:
|
||||
bool merge_in_place(const MidiBuffer &other);
|
||||
|
||||
template<typename BufferType, typename EventType>
|
||||
class iterator_base {
|
||||
class iterator_base
|
||||
{
|
||||
public:
|
||||
iterator_base<BufferType, EventType>(BufferType& b, framecnt_t o)
|
||||
: buffer(&b), offset(o) {}
|
||||
iterator_base<BufferType, EventType>(const iterator_base<BufferType,EventType>& o)
|
||||
: buffer (o.buffer), offset(o.offset) {}
|
||||
|
||||
inline iterator_base<BufferType,EventType> operator= (const iterator_base<BufferType,EventType>& o) {
|
||||
iterator_base<BufferType, EventType>(BufferType& b, framecnt_t o)
|
||||
: buffer(&b), offset(o) {}
|
||||
|
||||
iterator_base<BufferType, EventType>(const iterator_base<BufferType,EventType>& o)
|
||||
: buffer (o.buffer), offset(o.offset) {}
|
||||
|
||||
inline iterator_base<BufferType,EventType> operator= (const iterator_base<BufferType,EventType>& o) {
|
||||
if (&o != this) {
|
||||
buffer = o.buffer;
|
||||
offset = o.offset;
|
||||
@ -79,6 +81,7 @@ public:
|
||||
*((TimeType*)(buffer->_data + offset)),
|
||||
event_size, ev_start);
|
||||
}
|
||||
|
||||
inline EventType operator*() {
|
||||
uint8_t* ev_start = buffer->_data + offset + sizeof(TimeType);
|
||||
int event_size = Evoral::midi_event_size(ev_start);
|
||||
@ -99,12 +102,15 @@ public:
|
||||
offset += sizeof(TimeType) + event_size;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline bool operator!=(const iterator_base<BufferType, EventType>& other) const {
|
||||
return (buffer != other.buffer) || (offset != other.offset);
|
||||
}
|
||||
|
||||
inline bool operator==(const iterator_base<BufferType, EventType>& other) const {
|
||||
return (buffer == other.buffer) && (offset == other.offset);
|
||||
}
|
||||
|
||||
BufferType* buffer;
|
||||
size_t offset;
|
||||
};
|
||||
@ -118,7 +124,7 @@ public:
|
||||
const_iterator begin() const { return const_iterator(*this, 0); }
|
||||
const_iterator end() const { return const_iterator(*this, _size); }
|
||||
|
||||
iterator erase(const iterator& i) {
|
||||
iterator erase(const iterator& i) {
|
||||
assert (i.buffer == this);
|
||||
uint8_t* ev_start = _data + i.offset + sizeof (TimeType);
|
||||
int event_size = Evoral::midi_event_size (ev_start);
|
||||
@ -161,7 +167,7 @@ public:
|
||||
* its MIDI status byte.
|
||||
*/
|
||||
static bool second_simultaneous_midi_byte_is_first (uint8_t, uint8_t);
|
||||
|
||||
|
||||
private:
|
||||
friend class iterator_base< MidiBuffer, Evoral::MIDIEvent<TimeType> >;
|
||||
friend class iterator_base< const MidiBuffer, const Evoral::MIDIEvent<TimeType> >;
|
||||
@ -170,7 +176,6 @@ private:
|
||||
pframes_t _size;
|
||||
};
|
||||
|
||||
|
||||
} // namespace ARDOUR
|
||||
|
||||
#endif // __ardour_midi_buffer_h__
|
||||
|
Loading…
Reference in New Issue
Block a user