QDateTimeParser: simplify switch by exploiting fall-through
Several cases all fell together; their code tested away one of them; so putting it last and falling through to it avoids the need to test. Change-Id: I0bf555710604a56faa61b60bfe5484d5c5a1ee6b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
7243b7cbf2
commit
5bc814ac69
@ -1461,15 +1461,13 @@ QDateTimeParser::FieldInfo QDateTimeParser::fieldInfo(int index) const
|
||||
case MinuteSection:
|
||||
case Hour24Section:
|
||||
case Hour12Section:
|
||||
case YearSection:
|
||||
case YearSection2Digits:
|
||||
ret |= AllowPartial;
|
||||
Q_FALLTHROUGH();
|
||||
case YearSection:
|
||||
ret |= Numeric;
|
||||
if (sn.type != YearSection) {
|
||||
ret |= AllowPartial;
|
||||
}
|
||||
if (sn.count != 1) {
|
||||
if (sn.count != 1)
|
||||
ret |= FixedWidth;
|
||||
}
|
||||
break;
|
||||
case MonthSection:
|
||||
case DaySection:
|
||||
|
Loading…
Reference in New Issue
Block a user