From b62a6c3c2b7691f1bd28d318af1e485d564bdefa Mon Sep 17 00:00:00 2001 From: mikee47 Date: Sat, 13 Apr 2024 11:57:48 +0100 Subject: [PATCH] Reduce class size Member variables misaligned so consumes 14 bytes instead of 12 --- Sming/Core/DateTime.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sming/Core/DateTime.h b/Sming/Core/DateTime.h index e267bff0cc..cceb7b28ca 100644 --- a/Sming/Core/DateTime.h +++ b/Sming/Core/DateTime.h @@ -360,15 +360,15 @@ class DateTime uint8_t calcWeek(uint8_t firstDay) const; // Calculate week number based on firstDay of week public: + uint16_t Year = 0; ///< Full Year number + uint16_t DayofYear = 0; ///< Day of year (0-365) + uint8_t DayofWeek = 0; ///< Day of week (0-6 Sunday is day 0) + uint8_t Month = 0; ///< Month (0-11 Jan is month 0) + uint8_t Day = 0; ///< Day of month (1-31) uint8_t Hour = 0; ///< Hour (0-23) uint8_t Minute = 0; ///< Minute (0-59) uint8_t Second = 0; ///< Second (0-59) uint16_t Milliseconds = 0; ///< Milliseconds (0-999) - uint8_t Day = 0; ///< Day of month (1-31) - uint8_t DayofWeek = 0; ///< Day of week (0-6 Sunday is day 0) - uint16_t DayofYear = 0; ///< Day of year (0-365) - uint8_t Month = 0; ///< Month (0-11 Jan is month 0) - uint16_t Year = 0; ///< Full Year number }; /** @} */