Move comparison operator into library
This commit is contained in:
Submodule ds3231/ds3231 updated: 1388412d70...2a90cdee18
@@ -64,28 +64,6 @@ static inline void printLocalTime(const rtc::DateTime &dateTime)
|
||||
serial << dateTime << (dst ? F(" +2") : F(" +1")) << F("\r\n");
|
||||
}
|
||||
|
||||
static inline bool operator==(const rtc::DateTime &lhs, const rtc::DateTime &rhs)
|
||||
{
|
||||
if (lhs.second != rhs.second)
|
||||
return false;
|
||||
if (lhs.minute != rhs.minute)
|
||||
return false;
|
||||
if (lhs.hour != rhs.hour)
|
||||
return false;
|
||||
if (lhs.day != rhs.day)
|
||||
return false;
|
||||
if (lhs.month != rhs.month)
|
||||
return false;
|
||||
if (lhs.year != rhs.year)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool operator!=(const rtc::DateTime &lhs, const rtc::DateTime &rhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
static inline size_t receiveLine(char *buffer, const size_t maxLength)
|
||||
{
|
||||
uart_t serial;
|
||||
|
||||
Reference in New Issue
Block a user