mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
pre-sort port-names
This commit is contained in:
parent
bda5a4a4e6
commit
f84a7605d8
3 changed files with 27 additions and 3 deletions
|
|
@ -466,8 +466,16 @@ class CoreAudioBackend : public AudioBackend {
|
|||
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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue