From bdbce3b67ddf4c4a0ed48d18305315ab7da5ba01 Mon Sep 17 00:00:00 2001 From: Dennis Korpel Date: Sat, 6 Jan 2024 17:43:49 +0100 Subject: [PATCH] Use static array for table --- .dscanner.ini | 1 + std/internal/unicode_tables.d | 2 +- tools/unicode_table_generator.d | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.dscanner.ini b/.dscanner.ini index 4a79219bb..1e57b92b5 100644 --- a/.dscanner.ini +++ b/.dscanner.ini @@ -255,6 +255,7 @@ has_public_example="-etc.c.curl,\ -std.internal.math.gammafunction,\ -std.internal.scopebuffer,\ -std.internal.test.dummyrange,\ +-std.internal.unicode_tables,\ -std.int128,\ -std.json,\ -std.mathspecial,\ diff --git a/std/internal/unicode_tables.d b/std/internal/unicode_tables.d index d400ee64e..0daae8655 100644 --- a/std/internal/unicode_tables.d +++ b/std/internal/unicode_tables.d @@ -831,7 +831,7 @@ return t; } @property FCE fullCaseTable(size_t index) nothrow @nogc @safe pure { -static immutable ulong[] t = [ +static immutable ulong[3188] t = [ 0x1E90B000000021,0x1E92D000000121,0x10CAE000000021,0x10CEE000000121,0x00496000000021,0x00497000000121, 0x1E911000000021,0x1E933000000121,0x0A722000000021,0x0A723000000121,0x01F79000000021,0x01FF9000000121, 0x01F44000000021,0x01F4C000000121,0x0015A000000021,0x0015B000000121,0x010FD000000021,0x01CBD000000121, diff --git a/tools/unicode_table_generator.d b/tools/unicode_table_generator.d index 70ec6fde3..6f80ef3a1 100644 --- a/tools/unicode_table_generator.d +++ b/tools/unicode_table_generator.d @@ -901,7 +901,7 @@ void writeCaseFolding(File sink) writeln("}"); writeln("@property FCE fullCaseTable(size_t index) nothrow @nogc @safe pure"); writeln("{"); - write("static immutable ulong[] t = ["); + writef("static immutable ulong[%d] t = [", fullTable.length); int[4] maxS = 0; foreach (i, v; fullTable) {