QDateTime: pass explicit length to QLatin1String ctor

Apparently, determining that constant at compile time is a bit too much
work for GCC.

Effects on Linux GCC 4.9 stripped release builds:
 text   -276B
 data    +-0B
 relocs  +-0

Change-Id: I23144e64d57e3a2e1061e69b20f2b72575c273d8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
bb10
Marc Mutz 2015-01-20 21:32:49 +01:00
parent 0d0812db55
commit 9a34fed728
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,7 @@ static const char qt_shortMonthNames[][4] = {
int qt_monthNumberFromShortName(const QString &shortName)
{
for (unsigned int i = 0; i < sizeof(qt_shortMonthNames) / sizeof(qt_shortMonthNames[0]); ++i) {
if (shortName == QLatin1String(qt_shortMonthNames[i]))
if (shortName == QLatin1String(qt_shortMonthNames[i], 3))
return i + 1;
}
return -1;