mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Minor code cleanup
This commit is contained in:
parent
b0616fcbb1
commit
75fdd94d45
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue