Skip to content

Commit

Permalink
Add equality comparison to ConcreteAttributePath and ConcreteCommandPath
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple committed Oct 20, 2021
1 parent 1c0ded5 commit 111acad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/ConcreteAttributePath.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ struct ConcreteAttributePath
mEndpointId(aEndpointId), mClusterId(aClusterId), mAttributeId(aAttributeId)
{}

bool operator==(const ConcreteAttributePath & other) const
{
return mEndpointId == other.mEndpointId && mClusterId == other.mEndpointId && mAttributeId == other.mAttributeId;
}

const EndpointId mEndpointId = 0;
const ClusterId mClusterId = 0;
const AttributeId mAttributeId = 0;
Expand Down
5 changes: 5 additions & 0 deletions src/app/ConcreteCommandPath.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ struct ConcreteCommandPath
mEndpointId(aEndpointId), mClusterId(aClusterId), mCommandId(aCommandId)
{}

bool operator==(const ConcreteCommandPath & other) const
{
return mEndpointId == other.mEndpointId && mClusterId == other.mEndpointId && mCommandId == other.mCommandId;
}

const EndpointId mEndpointId = 0;
const ClusterId mClusterId = 0;
const CommandId mCommandId = 0;
Expand Down

0 comments on commit 111acad

Please sign in to comment.