diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2018-07-27 17:48:54 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2018-08-13 14:15:59 +0000 |
commit | b7613fb10fe1774b89fb197d295a3e229404fc45 (patch) | |
tree | c6c4c8d1a9957c64f0c0c6a03704efa4bc4a280f /src | |
parent | 6694065148e5222df2c4cac7bfbf1e36251acde8 (diff) |
Ignore a smaller type in the posix form of QCollator
It ignores its CollatorType, so we can use bool for it and save a few
bytes in QCollatorPrivate. The member using CollatorType follows three
existing bool members: a boolean will fit there, while an int requires
1-byte padding and its 4-byte payload.
Pointed out by Thiago Macieira.
Change-Id: I10c8ea6f1b735b1b872c509f18fd6a93e24c9b86
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/tools/qcollator_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qcollator_p.h b/src/corelib/tools/qcollator_p.h index f244a7721a..e89c08447c 100644 --- a/src/corelib/tools/qcollator_p.h +++ b/src/corelib/tools/qcollator_p.h @@ -85,8 +85,8 @@ const CollatorType NoCollator = 0; #else // posix - ignores CollatorType collator, only handles system locale typedef QVector<wchar_t> CollatorKeyType; -typedef int CollatorType; -const CollatorType NoCollator = 0; +typedef bool CollatorType; +const CollatorType NoCollator = false; #endif class QCollatorPrivate |