QDateTime: avoid relocations
The short month names all have length 3, so store them in a multi- dimensional const char array instead of as a pointer table. Effects on Linux GCC 4.9 stripped release builds: text -196B data -64B relocs -12 (est., somehow relinfo.pl reports nonsense on QtCore) Change-Id: If5f83e4f1eb5ba0b0f54b4144abec8b88fb8529f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>bb10
parent
eff19ed799
commit
0d0812db55
|
|
@ -155,7 +155,7 @@ static void getDateFromJulianDay(qint64 julianDay, int *yearp, int *monthp, int
|
|||
static const char monthDays[] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||
|
||||
#ifndef QT_NO_TEXTDATE
|
||||
static const char * const qt_shortMonthNames[] = {
|
||||
static const char qt_shortMonthNames[][4] = {
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue