summaryrefslogtreecommitdiffstats
path: root/header.LGPL
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2012-10-10 18:27:04 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-16 17:31:31 +0200
commitcd168110e0b9fbcba3f453de14131eb17c82109f (patch)
treeba89398d790c19574ca49e571b8c6640dad14872 /header.LGPL
parentcab891dc502f86cfc670d9facb2f9fa6708e9dd3 (diff)
QWindowsKeyMapper: use a more efficient data structure for 'keyLayout'
Instead of allocating small chunks (40 bytes) on the heap, use a contiguous array to hold them. This always occupies 10240 bytes of memory instead of 1024 (32 bits) or 2048 (64 bits) for the pointer array (plus heap memory which depends on the number of items allocated), but is more cache-friendly and uses less memory when the array isn't sparse. To emulate the nullptr, a new bool has been added (doesn't change sizeof(KeyboardLayoutItem)). Also replace a few more magic numbers by symbolic constants. Change-Id: I7160f600faddd63deea265c89dc6fd857c7b557f Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'header.LGPL')
0 files changed, 0 insertions, 0 deletions