mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-26 08:05: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;
|
new_tm.tm_mon = 11;
|
||||||
}
|
}
|
||||||
else if (mEditIndex == 2) {
|
else if (mEditIndex == 2) {
|
||||||
const int days_in_month =
|
const int days_in_month {
|
||||||
Utils::Time::daysInMonth(new_tm.tm_year + 1900, new_tm.tm_mon + 1);
|
Utils::Time::daysInMonth(new_tm.tm_year + 1900, new_tm.tm_mon + 1)};
|
||||||
new_tm.tm_mday += mKeyRepeatDir;
|
new_tm.tm_mday += mKeyRepeatDir;
|
||||||
|
|
||||||
if (new_tm.tm_mday > days_in_month)
|
if (new_tm.tm_mday > days_in_month)
|
||||||
|
@ -269,7 +269,7 @@ void DateTimeEditComponent::changeDate()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate day.
|
// 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)
|
if (new_tm.tm_mday > days_in_month)
|
||||||
new_tm.tm_mday = days_in_month;
|
new_tm.tm_mday = days_in_month;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue