mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-04 22:36:32 +02:00
Correct less- and greater-than operators (#6521)
Lets Manufacturer ranges in bluetooth address space be filtered correctly
This commit is contained in:
@ -71,7 +71,7 @@ bool BLEAddress::operator!=(const BLEAddress& otherAddress) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool BLEAddress::operator<(const BLEAddress& otherAddress) const {
|
bool BLEAddress::operator<(const BLEAddress& otherAddress) const {
|
||||||
return memcmp(otherAddress.m_address, m_address, ESP_BD_ADDR_LEN) < 0;
|
return memcmp(m_address, otherAddress.m_address, ESP_BD_ADDR_LEN) < 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BLEAddress::operator<=(const BLEAddress& otherAddress) const {
|
bool BLEAddress::operator<=(const BLEAddress& otherAddress) const {
|
||||||
@ -83,7 +83,7 @@ bool BLEAddress::operator>=(const BLEAddress& otherAddress) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool BLEAddress::operator>(const BLEAddress& otherAddress) const {
|
bool BLEAddress::operator>(const BLEAddress& otherAddress) const {
|
||||||
return memcmp(otherAddress.m_address, m_address, ESP_BD_ADDR_LEN) > 0;
|
return memcmp(m_address, otherAddress.m_address, ESP_BD_ADDR_LEN) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user