Move comparison operator into library
This commit is contained in:
parent
f8ee536829
commit
a897b7d9be
@ -1 +1 @@
|
|||||||
Subproject commit 1388412d70fc9673465d9ae1f115d7696c06d77d
|
Subproject commit 2a90cdee18579b8897c572f6cd110efbc1c82f02
|
||||||
@ -64,28 +64,6 @@ static inline void printLocalTime(const rtc::DateTime &dateTime)
|
|||||||
serial << dateTime << (dst ? F(" +2") : F(" +1")) << F("\r\n");
|
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)
|
static inline size_t receiveLine(char *buffer, const size_t maxLength)
|
||||||
{
|
{
|
||||||
uart_t serial;
|
uart_t serial;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user