Skip to content

Commit

Permalink
add equality relation for encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisBiryukov91 committed Sep 18, 2024
1 parent 5f33cc7 commit 70c74b9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions include/zenoh/api/encoding.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ class Encoding : public Owned<::z_owned_encoding_t> {
return *this;
};

/// @brief Equality relation.
/// @param other an encoding to compare with.
/// @return true if both encodings are equal, false otherwise.
bool operator==(const Encoding& other) {
return ::z_encoding_equals(interop::as_loaned_c_ptr(*this), interop::as_loaned_c_ptr(other));
};

Encoding& operator=(Encoding&& other) = default;
};

Expand Down
2 changes: 1 addition & 1 deletion zenoh-c
2 changes: 1 addition & 1 deletion zenoh-pico
Submodule zenoh-pico updated 183 files

0 comments on commit 70c74b9

Please sign in to comment.