From d4d80438a34b83e50e36268fc966aca69a365d16 Mon Sep 17 00:00:00 2001 From: Job Bautista Date: Thu, 23 Jun 2022 13:23:20 +0800 Subject: Issue #326 - Part 3: Explicitly make the Script enum a 16-bit type This is so we can add a field to gfxShapedWord without making it bigger. Backported from Mozilla bug 1353000. --- intl/unicharutil/tools/genUnicodePropertyData.pl | 2 +- intl/unicharutil/util/nsUnicodePropertyData.cpp | 2 +- intl/unicharutil/util/nsUnicodeScriptCodes.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/intl/unicharutil/tools/genUnicodePropertyData.pl b/intl/unicharutil/tools/genUnicodePropertyData.pl index 6107737b38..a53357c460 100755 --- a/intl/unicharutil/tools/genUnicodePropertyData.pl +++ b/intl/unicharutil/tools/genUnicodePropertyData.pl @@ -926,7 +926,7 @@ close DATA_TABLES; print HEADER "namespace mozilla {\n"; print HEADER "namespace unicode {\n"; -print HEADER "enum class Script {\n"; +print HEADER "enum class Script : int16_t {\n"; for (my $i = 0; $i < scalar @scriptCodeToName; ++$i) { print HEADER " ", $scriptCodeToName[$i], " = ", $i, ",\n"; } diff --git a/intl/unicharutil/util/nsUnicodePropertyData.cpp b/intl/unicharutil/util/nsUnicodePropertyData.cpp index fc730ac5b5..2bc1abb002 100644 --- a/intl/unicharutil/util/nsUnicodePropertyData.cpp +++ b/intl/unicharutil/util/nsUnicodePropertyData.cpp @@ -11,7 +11,7 @@ */ /* - * Created on Wed Jun 22 10:09:48 2022 from UCD data files with version info: + * Created on Wed Jun 22 12:55:37 2022 from UCD data files with version info: * # Unicode Character Database diff --git a/intl/unicharutil/util/nsUnicodeScriptCodes.h b/intl/unicharutil/util/nsUnicodeScriptCodes.h index 8cbc2b6a4a..b907db62d2 100644 --- a/intl/unicharutil/util/nsUnicodeScriptCodes.h +++ b/intl/unicharutil/util/nsUnicodeScriptCodes.h @@ -11,7 +11,7 @@ */ /* - * Created on Wed Jun 22 10:09:48 2022 from UCD data files with version info: + * Created on Wed Jun 22 12:55:37 2022 from UCD data files with version info: * # Unicode Character Database @@ -89,7 +89,7 @@ struct nsCharProps2 { namespace mozilla { namespace unicode { -enum class Script { +enum class Script : int16_t { COMMON = 0, INHERITED = 1, ARABIC = 2, -- cgit v1.2.3