summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/snippets/code
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-09-13 21:18:17 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-11-04 14:14:49 +0000
commit9a07ab9234ccb4ed0d6aa3a64b4b2c888635dae5 (patch)
treedd29f849487b72ab5519ef574da9adadf4f331e9 /src/widgets/doc/snippets/code
parent932ad390802319af1996f678d9226c2a17a913d0 (diff)
QCalendarWidget: replace a QMap<Qt::DayOfWeek,.> with a static assoc array
Since Qt::DayOfWeek has such a limited range, it doesn't really make sense to use it as a key in a QMap, which is optimized for much larger key spaces. Replace by a C array of the value type, and, since the value type in question (QTextCharFormat) doesn't have an invalid state, use a bool array to track whether any of the seven possible keys has been inserted. Wrap that in a small helper class which provides only the subset of QMap API that QCalendarModel needs. Saves 1352 bytes of text size on optimized GCC AMD64 builds. Change-Id: Ie51390825d5933739659c4ea8e8da0af68577a9d Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/doc/snippets/code')
0 files changed, 0 insertions, 0 deletions