std::vector<AlsaPort *> _system_midi_in;
std::vector<AlsaPort *> _system_midi_out;
+ struct SortByPortName
+ {
+ bool operator ()(const AlsaPort* lhs, const AlsaPort* rhs) const
+ {
+ return lhs->name () < rhs->name ();
+ }
+ };
+
typedef std::map<std::string, AlsaPort *> PortMap; // fast lookup in _ports
- typedef std::set<AlsaPort *> PortIndex; // fast lookup in _ports
+ typedef std::set<AlsaPort *, SortByPortName> PortIndex; // fast lookup in _ports
PortMap _portmap;
PortIndex _ports;
std::vector<CoreBackendPort *> _system_midi_in;
std::vector<CoreBackendPort *> _system_midi_out;
+ struct SortByPortName
+ {
+ bool operator ()(const CoreBackendPort* lhs, const CoreBackendPort* rhs) const
+ {
+ return lhs->name () < rhs->name ();
+ }
+ };
+
typedef std::map<std::string, CoreBackendPort *> PortMap; // fast lookup in _ports
- typedef std::set<CoreBackendPort *> PortIndex; // fast lookup in _ports
+ typedef std::set<CoreBackendPort *, SortByPortName> PortIndex; // fast lookup in _ports
PortMap _portmap;
PortIndex _ports;
std::vector<DummyMidiPort *> _system_midi_in;
std::vector<DummyMidiPort *> _system_midi_out;
+ struct SortByPortName
+ {
+ bool operator ()(const DummyPort* lhs, const DummyPort* rhs) const
+ {
+ return lhs->name () < rhs->name ();
+ }
+ };
+
typedef std::map<std::string, DummyPort *> PortMap; // fast lookup in _ports
- typedef std::set<DummyPort *> PortIndex; // fast lookup in _ports
+ typedef std::set<DummyPort *, SortByPortName> PortIndex; // fast lookup in _ports
PortMap _portmap;
PortIndex _ports;