diff --git a/libs/ardour/ardour/port_manager.h b/libs/ardour/ardour/port_manager.h index 4569a241ba..09b9b66b47 100644 --- a/libs/ardour/ardour/port_manager.h +++ b/libs/ardour/ardour/port_manager.h @@ -29,6 +29,7 @@ #include +#include "pbd/natsort.h" #include "pbd/rcu.h" #include "pbd/ringbuffer.h" @@ -81,16 +82,22 @@ public: float chn_active[17]; }; - typedef std::map > Ports; - typedef std::list > PortList; + struct SortByPortName { + bool operator() (std::string const& a, std::string const& b) const { + return PBD::naturally_less (a.c_str (), b.c_str ()); + } + }; - typedef boost::shared_ptr AudioPortScope; - typedef std::map AudioPortScopes; - typedef std::map AudioPortMeters; + typedef std::map, SortByPortName> Ports; + typedef std::list > PortList; - typedef boost::shared_ptr MIDIPortMonitor; - typedef std::map MIDIPortMonitors; - typedef std::map MIDIPortMeters; + typedef boost::shared_ptr AudioPortScope; + typedef std::map AudioPortScopes; + typedef std::map AudioPortMeters; + + typedef boost::shared_ptr MIDIPortMonitor; + typedef std::map MIDIPortMonitors; + typedef std::map MIDIPortMeters; PortManager (); virtual ~PortManager () {}