From 75fdd94d4506f106aa8cb4a7e36fb96386f87c52 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 11 Aug 2024 18:27:37 +0200 Subject: [PATCH] Minor code cleanup --- es-core/src/components/DateTimeEditComponent.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/es-core/src/components/DateTimeEditComponent.cpp b/es-core/src/components/DateTimeEditComponent.cpp index 35ebb0c58..a5fc8cc76 100644 --- a/es-core/src/components/DateTimeEditComponent.cpp +++ b/es-core/src/components/DateTimeEditComponent.cpp @@ -258,8 +258,8 @@ void DateTimeEditComponent::changeDate() new_tm.tm_mon = 11; } else if (mEditIndex == 2) { - const int days_in_month = - Utils::Time::daysInMonth(new_tm.tm_year + 1900, new_tm.tm_mon + 1); + const int days_in_month { + Utils::Time::daysInMonth(new_tm.tm_year + 1900, new_tm.tm_mon + 1)}; new_tm.tm_mday += mKeyRepeatDir; if (new_tm.tm_mday > days_in_month) @@ -269,7 +269,7 @@ void DateTimeEditComponent::changeDate() } // Validate day. - const int days_in_month = Utils::Time::daysInMonth(new_tm.tm_year + 1900, new_tm.tm_mon + 1); + const int days_in_month {Utils::Time::daysInMonth(new_tm.tm_year + 1900, new_tm.tm_mon + 1)}; if (new_tm.tm_mday > days_in_month) new_tm.tm_mday = days_in_month;