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>
This commit is contained in:
Edward Welbourne 2018-07-27 17:48:54 +02:00
parent 6694065148
commit b7613fb10f

View File

@ -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