Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add equality comparison to ConcreteAttributePath and ConcreteCommandPath #10707

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.mClusterId && 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.mClusterId && mCommandId == other.mCommandId;
}

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