diff options
Diffstat (limited to 'mojo/shell/public/cpp/lib/capabilities.cc')
-rw-r--r-- | mojo/shell/public/cpp/lib/capabilities.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mojo/shell/public/cpp/lib/capabilities.cc b/mojo/shell/public/cpp/lib/capabilities.cc index cc3fc18..add9150 100644 --- a/mojo/shell/public/cpp/lib/capabilities.cc +++ b/mojo/shell/public/cpp/lib/capabilities.cc @@ -13,6 +13,11 @@ bool CapabilityRequest::operator==(const CapabilityRequest& other) const { return other.classes == classes && other.interfaces == interfaces; } +bool CapabilityRequest::operator<(const CapabilityRequest& other) const { + return std::tie(classes, interfaces) < + std::tie(other.classes, other.interfaces); +} + CapabilitySpec::CapabilitySpec() {} CapabilitySpec::~CapabilitySpec() {} @@ -20,6 +25,11 @@ bool CapabilitySpec::operator==(const CapabilitySpec& other) const { return other.provided == provided && other.required == required; } +bool CapabilitySpec::operator<(const CapabilitySpec& other) const { + return std::tie(provided, required) < + std::tie(other.provided, other.required); +} + // static shell::mojom::CapabilitySpecPtr TypeConverter<shell::mojom::CapabilitySpecPtr, CapabilitySpec>::Convert( |