mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-30 08:53:08 +01:00
Prefer comparison operators as part of the class
This commit is contained in:
parent
ce95c9fb09
commit
37c0fceeac
1 changed files with 5 additions and 1 deletions
|
|
@ -104,6 +104,10 @@ class LIBARDOUR_API BackendPort : public ProtoPort
|
|||
|
||||
void update_connected_latency (bool for_playback);
|
||||
|
||||
bool operator< (BackendPort const& rhs) const {
|
||||
return PBD::naturally_less (name ().c_str (), rhs.name ().c_str ());
|
||||
}
|
||||
|
||||
protected:
|
||||
PortEngineSharedImpl& _backend;
|
||||
|
||||
|
|
@ -215,7 +219,7 @@ protected:
|
|||
|
||||
struct SortByPortName {
|
||||
bool operator() (BackendPortHandle lhs, BackendPortHandle rhs) const {
|
||||
return PBD::naturally_less (lhs->name ().c_str (), rhs->name ().c_str ());
|
||||
return *lhs < *rhs;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue