[router-adv] have RouterAdvMessage inherit from Unequatable (#6580)

This commit is contained in:
Abtin Keshavarzian
2021-05-06 19:28:28 -07:00
committed by GitHub
parent f4001aa26d
commit 63a4dc1fa5
@@ -47,6 +47,7 @@
#include <openthread/platform/toolchain.h>
#include "common/encoding.hpp"
#include "common/equatable.hpp"
#include "net/icmp6.hpp"
#include "net/ip6.hpp"
@@ -386,7 +387,7 @@ static_assert(sizeof(RouteInfoOption) == 24, "invalid RouteInfoOption structure"
*
*/
OT_TOOL_PACKED_BEGIN
class RouterAdvMessage
class RouterAdvMessage : public Unequatable<RouterAdvMessage>
{
public:
/**
@@ -459,18 +460,6 @@ public:
*/
bool operator==(const RouterAdvMessage &aOther) const;
/**
* This method overloads operator `!=` to evaluate whether or not
* two instances of `RouterAdvMessage` are equal.
*
* @param[in] aOther The other `RouterAdvMessage` instance to compare with.
*
* @retval TRUE If the two `RouterAdvMessage` instances are not equal.
* @retval FALSE If the two `RouterAdvMessage` instances are equal.
*
*/
bool operator!=(const RouterAdvMessage &aOther) const { return !(*this == aOther); }
private:
enum : uint8_t
{