13
0

Prefer comparison operators as part of the class

This commit is contained in:
Robin Gareus 2022-05-06 01:18:05 +02:00
parent ce95c9fb09
commit 37c0fceeac
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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;
}
};