diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2012-10-10 18:27:04 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-16 17:31:31 +0200 |
commit | cd168110e0b9fbcba3f453de14131eb17c82109f (patch) | |
tree | ba89398d790c19574ca49e571b8c6640dad14872 /header.LGPL | |
parent | cab891dc502f86cfc670d9facb2f9fa6708e9dd3 (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