std::copy(addr, addr + kLength, address);
};
-bool RawAddress::operator<(const RawAddress& rhs) const {
- return std::memcmp(address, rhs.address, sizeof(address)) < 0;
-}
-
-bool RawAddress::operator==(const RawAddress& rhs) const {
- return std::memcmp(address, rhs.address, sizeof(address)) == 0;
-}
-
std::string RawAddress::ToString() const {
return base::StringPrintf("%02x:%02x:%02x:%02x:%02x:%02x", address[0],
address[1], address[2], address[3], address[4],
RawAddress() = default;
RawAddress(const uint8_t (&addr)[6]);
- bool operator<(const RawAddress& rhs) const;
+ bool operator<(const RawAddress& rhs) const {
+ return (std::memcmp(address, rhs.address, sizeof(address)) < 0);
+ }
+ bool operator==(const RawAddress& rhs) const {
+ return (std::memcmp(address, rhs.address, sizeof(address)) == 0);
+ }
bool operator>(const RawAddress& rhs) const { return (rhs < *this); }
bool operator<=(const RawAddress& rhs) const { return !(*this > rhs); }
bool operator>=(const RawAddress& rhs) const { return !(*this < rhs); }
- bool operator==(const RawAddress& rhs) const;
bool operator!=(const RawAddress& rhs) const { return !(*this == rhs); }
bool IsEmpty() const { return *this == kEmpty; }