From b7613fb10fe1774b89fb197d295a3e229404fc45 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 27 Jul 2018 17:48:54 +0200 Subject: 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 --- src/corelib/tools/qcollator_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/tools') 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 CollatorKeyType; -typedef int CollatorType; -const CollatorType NoCollator = 0; +typedef bool CollatorType; +const CollatorType NoCollator = false; #endif class QCollatorPrivate -- cgit v1.2.3