Make initializers into declare-and-initialize.

Eliminates separate declaration line, makes unambiguous that all are
initialized.

Change-Id: Ib419a385b38f98070c06428da246d4580b0a0dbc
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
This commit is contained in:
Edward Welbourne 2016-01-18 14:19:54 +01:00
parent 54ece34283
commit fbe7000ba3

View File

@ -125,14 +125,13 @@ bool QDateTimeParser::setDigit(QDateTime &v, int index, int newVal) const
}
const SectionNode &node = sectionNodes.at(index);
int year, month, day, hour, minute, second, msec;
year = v.date().year();
month = v.date().month();
day = v.date().day();
hour = v.time().hour();
minute = v.time().minute();
second = v.time().second();
msec = v.time().msec();
int year = v.date().year();
int month = v.date().month();
int day = v.date().day();
int hour = v.time().hour();
int minute = v.time().minute();
int second = v.time().second();
int msec = v.time().msec();
switch (node.type) {
case Hour24Section: case Hour12Section: hour = newVal; break;