Unverified Commit 6fe1c4c5 authored by Brian Rossmajer's avatar Brian Rossmajer Committed by GitHub

Correct less- and greater-than operators (#6521)

Lets Manufacturer ranges in bluetooth address space be filtered correctly
parent 5d6b9d09
......@@ -71,7 +71,7 @@ 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 {
......@@ -83,7 +83,7 @@ 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;
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment