mirror of
https://github.com/esphome/esphome.git
synced 2025-10-10 13:53:49 +01:00
Mark ESPTime comparison operators as const (#9335)
This commit is contained in:
@@ -226,11 +226,11 @@ int32_t ESPTime::timezone_offset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
bool ESPTime::operator<(ESPTime other) { return this->timestamp < other.timestamp; }
|
||||
bool ESPTime::operator<=(ESPTime other) { return this->timestamp <= other.timestamp; }
|
||||
bool ESPTime::operator==(ESPTime other) { return this->timestamp == other.timestamp; }
|
||||
bool ESPTime::operator>=(ESPTime other) { return this->timestamp >= other.timestamp; }
|
||||
bool ESPTime::operator>(ESPTime other) { return this->timestamp > other.timestamp; }
|
||||
bool ESPTime::operator<(const ESPTime &other) const { return this->timestamp < other.timestamp; }
|
||||
bool ESPTime::operator<=(const ESPTime &other) const { return this->timestamp <= other.timestamp; }
|
||||
bool ESPTime::operator==(const ESPTime &other) const { return this->timestamp == other.timestamp; }
|
||||
bool ESPTime::operator>=(const ESPTime &other) const { return this->timestamp >= other.timestamp; }
|
||||
bool ESPTime::operator>(const ESPTime &other) const { return this->timestamp > other.timestamp; }
|
||||
|
||||
template<typename T> bool increment_time_value(T ¤t, uint16_t begin, uint16_t end) {
|
||||
current++;
|
||||
|
Reference in New Issue
Block a user