summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_model.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-10-14 16:10:01 +0000
committerDavid Robillard <d@drobilla.net>2009-10-14 16:10:01 +0000
commitbb9cc45cd22af67ac275a5e73accbe14fee664d8 (patch)
treee52977d3eae6ff07b856088041a080a2fa3e5b79 /libs/ardour/midi_model.cc
parent8c4ce1e2ce35571aed5a686671431fdfffae7f8c (diff)
Strip trailing whitespace and fix other whitespace errors (e.g. space/tab mixing). Whitespace changes only.
Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red. I don't know the emacs equivalent... git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_model.cc')
-rw-r--r--libs/ardour/midi_model.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc
index 79e59ecde4..fb09cda60f 100644
--- a/libs/ardour/midi_model.cc
+++ b/libs/ardour/midi_model.cc
@@ -146,7 +146,7 @@ MidiModel::DeltaCommand::operator()()
for (NoteList::iterator i = _removed_notes.begin(); i != _removed_notes.end(); ++i) {
_model->remove_note_unlocked(*i);
}
-
+
_model->write_unlock();
_model->ContentsChanged(); /* EMIT SIGNAL */
}
@@ -156,7 +156,7 @@ MidiModel::DeltaCommand::undo()
{
// This could be made much faster by using a priority_queue for added and
// removed notes (or sort here), and doing a single iteration over _model
-
+
Glib::Mutex::Lock lm (_model->_midi_source->mutex());
_model->_midi_source->invalidate(); // release model read lock
_model->write_lock();
@@ -411,7 +411,7 @@ MidiModel::DiffCommand::operator()()
break;
}
}
-
+
_model->write_unlock();
_model->ContentsChanged(); /* EMIT SIGNAL */
}
@@ -452,7 +452,7 @@ XMLNode&
MidiModel::DiffCommand::marshal_change(const NotePropertyChange& change)
{
XMLNode* xml_change = new XMLNode("change");
-
+
/* first, the change itself */
xml_change->add_property ("property", enum_2_string (change.property));
@@ -480,13 +480,13 @@ MidiModel::DiffCommand::marshal_change(const NotePropertyChange& change)
/* now the rest of the note */
const SMFSource* smf = dynamic_cast<const SMFSource*> (_model->midi_source());
-
+
if (change.property != NoteNumber) {
ostringstream note_str;
note_str << int(change.note->note());
xml_change->add_property("note", note_str.str());
}
-
+
if (change.property != Channel) {
ostringstream channel_str;
channel_str << int(change.note->channel());
@@ -631,7 +631,7 @@ MidiModel::DiffCommand::unmarshal_change(XMLNode *xml_change)
/* we must point at the instance of the note that is actually in the model.
so go look for it ...
*/
-
+
boost::shared_ptr<Evoral::Note<TimeType> > new_note (new Evoral::Note<TimeType> (channel, time, length, note, velocity));
change.note = _model->find_note (new_note);
@@ -696,13 +696,13 @@ MidiModel::write_to(boost::shared_ptr<MidiSource> source)
set_percussive(false);
source->drop_model();
-
+
for (Evoral::Sequence<TimeType>::const_iterator i = begin(); i != end(); ++i) {
source->append_event_unlocked_beats(*i);
}
-
+
set_percussive(old_percussive);
-
+
read_unlock();
set_edited(false);
@@ -717,14 +717,14 @@ MidiModel::get_state()
}
boost::shared_ptr<Evoral::Note<MidiModel::TimeType> >
-MidiModel::find_note (boost::shared_ptr<Evoral::Note<TimeType> > other)
+MidiModel::find_note (boost::shared_ptr<Evoral::Note<TimeType> > other)
{
for (Notes::iterator x = notes().begin(); x != notes().end(); ++x) {
if (**x == *other) {
return *x;
}
- /* XXX optimize by using a stored iterator and break out
+ /* XXX optimize by using a stored iterator and break out
when passed start time.
*/
}