From d2be9d1227ebb48fad96326dd63164244d05918c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 25 Dec 2020 02:19:55 +0100 Subject: Fix operator==(const EUI48& lhs, const EUI48& rhs): Sloppy typo lhs -> rhs for 2nd argument; Remove operator<(..) --- api/direct_bt/BTAddress.hpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'api/direct_bt/BTAddress.hpp') diff --git a/api/direct_bt/BTAddress.hpp b/api/direct_bt/BTAddress.hpp index 3b91e45e..01f54a37 100644 --- a/api/direct_bt/BTAddress.hpp +++ b/api/direct_bt/BTAddress.hpp @@ -202,16 +202,13 @@ namespace direct_bt { std::string toString() const; } ); - inline bool operator<(const EUI48& lhs, const EUI48& rhs) noexcept - { return memcmp(&lhs, &rhs, sizeof(EUI48))<0; } - inline bool operator==(const EUI48& lhs, const EUI48& rhs) noexcept { if( &lhs == &rhs ) { return true; } //return !memcmp(&lhs, &rhs, sizeof(EUI48)); const uint8_t * a = lhs.b; - const uint8_t * b = lhs.b; + const uint8_t * b = rhs.b; return a[0] == b[0] && a[1] == b[1] && a[2] == b[2] && -- cgit v1.2.3