Skip to content

Commit 0d074ee

Browse files
committed
screens: Add notes about using C++20 features
1 parent 8baa317 commit 0d074ee

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/displayapp/screens/WatchFaceCasioStyleG7710.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ void WatchFaceCasioStyleG7710::Refresh() {
276276
std::chrono::system_clock::to_time_t(std::chrono::time_point_cast<std::chrono::system_clock::duration>(currentDateTime.Get()));
277277
tm* tmTime = std::localtime(&ttTime);
278278

279+
// TODO: When we start using C++20, use std::chrono::year::is_leap
279280
int daysInCurrentYear = (year % 4 == 0 && year % 100 != 0) || year % 400 == 0 ? 366 : 365;
280281
uint16_t daysTillEndOfYearNumber = daysInCurrentYear - dayOfYear;
281282

src/displayapp/screens/settings/SettingSetDate.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ namespace {
2828
int MaximumDayOfMonth(uint8_t month, uint16_t year) {
2929
switch (month) {
3030
case 2: {
31+
// TODO: When we start using C++20, use std::chrono::year::is_leap
3132
if ((((year % 4) == 0) && ((year % 100) != 0)) || ((year % 400) == 0)) {
3233
return 29;
3334
}

0 commit comments

Comments
 (0)