From 3a6d31d3faa1a6733cf9abac0897d6749c55090d Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sat, 3 Feb 2024 18:03:27 +0200 Subject: [PATCH] BAN: Add comparison for MAC --- BAN/include/BAN/MAC.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/BAN/include/BAN/MAC.h b/BAN/include/BAN/MAC.h index 1fdcc9e60b..cd4e408c47 100644 --- a/BAN/include/BAN/MAC.h +++ b/BAN/include/BAN/MAC.h @@ -8,6 +8,17 @@ namespace BAN struct MACAddress { uint8_t address[6]; + + constexpr bool operator==(const MACAddress& other) const + { + return + address[0] == other.address[0] && + address[1] == other.address[1] && + address[2] == other.address[2] && + address[3] == other.address[3] && + address[4] == other.address[4] && + address[5] == other.address[5]; + } }; }