Avoid shadowing in QDateTimeParser::findAmPm.

A parameter was called index; but an inner block re-used that name.
Rename the parameter.

Change-Id: I2fa18f32aa129c5b1d8de6c4b6571438eeefea14
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
This commit is contained in:
Edward Welbourne 2016-01-18 13:33:22 +01:00
parent 74a7454b37
commit 54ece34283

View File

@ -1371,9 +1371,9 @@ int QDateTimeParser::findDay(const QString &str1, int startDay, int sectionIndex
*/
int QDateTimeParser::findAmPm(QString &str, int index, int *used) const
int QDateTimeParser::findAmPm(QString &str, int sectionIndex, int *used) const
{
const SectionNode &s = sectionNode(index);
const SectionNode &s = sectionNode(sectionIndex);
if (s.type != AmPmSection) {
qWarning("QDateTimeParser::findAmPm Internal error");
return -1;
@ -1384,7 +1384,7 @@ int QDateTimeParser::findAmPm(QString &str, int index, int *used) const
return PossibleBoth;
}
const QLatin1Char space(' ');
int size = sectionMaxSize(index);
int size = sectionMaxSize(sectionIndex);
enum {
amindex = 0,