Remove unnecessary 0 checks before delete; see http://www.parashift.com/c++-faq-lite...
[ardour.git] / libs / ardour / midi_model.cc
index 1f23ee9561481c72b5c6300600d5413402b9ebe6..c1d53a25539d9247852e2de6d19f9bc79940e24c 100644 (file)
@@ -263,7 +263,7 @@ int MidiModel::DeltaCommand::set_state(const XMLNode& delta_command)
 XMLNode& MidiModel::DeltaCommand::get_state()
 {
        XMLNode *delta_command = new XMLNode(DELTA_COMMAND_ELEMENT);
-       delta_command->add_property("midi_source", _model->midi_source()->id().to_s());
+       delta_command->add_property("midi-source", _model->midi_source()->id().to_s());
 
        XMLNode *added_notes = delta_command->add_child(ADDED_NOTES_ELEMENT);
        for_each(_added_notes.begin(), _added_notes.end(), sigc::compose(
@@ -278,13 +278,6 @@ XMLNode& MidiModel::DeltaCommand::get_state()
        return *delta_command;
 }
 
-struct EventTimeComparator {
-       typedef const Evoral::Event* value_type;
-       inline bool operator()(const Evoral::Event& a, const Evoral::Event& b) const {
-               return a.time() >= b.time();
-       }
-};
-
 /** Write the model to a MidiSource (i.e. save the model).
  * This is different from manually using read to write to a source in that
  * note off events are written regardless of the track mode.  This is so the