Address PR comments

This commit is contained in:
Alexander Bock
2020-09-04 13:46:20 +02:00
parent 95db615dab
commit 6eb0aea757
2 changed files with 15 additions and 15 deletions
+4 -4
View File
@@ -212,24 +212,24 @@ void DateTime::incrementOnce(int value, char unit) {
if (singleIncrement(_minute, value, 0, 59)) {
break;
}
//[[ fallthrough ]]
[[ fallthrough ]];
case 'h':
if (singleIncrement(_hour, value, 0, 23)) {
break;
}
//[[ fallthrough ]]
[[ fallthrough ]];
case 'd':
if (singleIncrement(_day, value, 1, monthSize(_month, _year))) {
break;
}
//[[ fallthrough ]]
[[ fallthrough ]];
case 'M':
inBounds = singleIncrement(_month, value, 1, 12);
_day = std::clamp(_day, 1, monthSize(_month, _year));
if (inBounds) {
break;
}
//[[ fallthrough ]]
[[ fallthrough ]];
case 'y':
_year += value;
break;