diff options
| author | Marc Mutz <marc.mutz@kdab.com> | 2014-09-13 21:18:17 +0200 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@kdab.com> | 2015-11-04 14:14:49 +0000 |
| commit | 9a07ab9234ccb4ed0d6aa3a64b4b2c888635dae5 (patch) | |
| tree | dd29f849487b72ab5519ef574da9adadf4f331e9 /src/widgets/doc/snippets/code | |
| parent | 932ad390802319af1996f678d9226c2a17a913d0 (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
