mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 03:07:47 +00:00
[router-adv] have RouterAdvMessage inherit from Unequatable (#6580)
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user