Prefer comparison operators as part of the class
This commit is contained in:
parent
ce95c9fb09
commit
37c0fceeac
@ -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…
Reference in New Issue
Block a user