Skip to content

Commit 2c422ce

Browse files
committed
GCC 10.2 fixes
1 parent 0e3f0fe commit 2c422ce

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

lib/src/unicode_mappings.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
namespace sysstr::util::unicode
1414
{
1515

16-
constexpr char16_t is_whitespace::chars[26] =
16+
const char16_t is_whitespace::chars[26] =
1717
u"\u0009\u000A\u000B\u000C\u000D\u0020\u0085\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007"
1818
u"\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000";
1919

20-
constexpr char16_t case_mapper::cased_data[3940] =
20+
const char16_t case_mapper::cased_data[3940] =
2121
u"\u0061\u0062\u0063\u0064\u0065\u0066\u0067\u0068\u0069\u006A\u006B\u006C\u006D\u006E\u006F\u0070\u0071"
2222
u"\u0072\u0073\u0074\u0075\u0076\u0077\u0078\u0079\u007A\u0041\u0042\u0043\u0044\u0045\u0046\u0047\u0048"
2323
u"\u0049\u004A\u004B\u004C\u004D\u004E\u004F\u0050\u0051\u0052\u0053\u0054\u0055\u0056\u0057\u0058\u0059"
@@ -241,7 +241,7 @@ namespace sysstr::util::unicode
241241
u"\U0001E911\U0001E912\U0001E913\U0001E914\U0001E915\U0001E916\U0001E917\U0001E918\U0001E919\U0001E91A"
242242
u"\U0001E91B\U0001E91C\U0001E91D\U0001E91E\U0001E91F\U0001E920\U0001E921";
243243

244-
constexpr std::array<uint32_t, 128> case_mapper::lookup::ascii({{
244+
const std::array<uint32_t, 128> case_mapper::lookup::ascii({{
245245
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
246246
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
247247
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -257,7 +257,7 @@ namespace sysstr::util::unicode
257257
0x10100047, 0x10100047, 0x10100047, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
258258
}});
259259

260-
constexpr std::array<uint8_t, 2048> case_mapper::lookup::stage1({{
260+
const std::array<uint8_t, 2048> case_mapper::lookup::stage1({{
261261
23, 54, 55, 60, 40, 49, 59, 30, 36, 6, 0, 10, 43, 39, 37, 57, 44, 0, 20, 0, 0, 0, 56, 33, 45, 0, 0, 0, 0, 0,
262262
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
263263
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, 14, 42, 46, 38, 0, 0, 0, 0,
@@ -329,7 +329,7 @@ namespace sysstr::util::unicode
329329
0, 0, 0, 0, 0, 0, 0, 0
330330
}});
331331

332-
constexpr std::array<std::array<uint16_t, 32>, 64> case_mapper::lookup::stage2({{
332+
const std::array<std::array<uint16_t, 32>, 64> case_mapper::lookup::stage2({{
333333
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
334334
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4}},
335335
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17}},
@@ -396,7 +396,7 @@ namespace sysstr::util::unicode
396396
{{347, 347, 347, 331, 347, 347, 343, 54, 61, 17, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
397397
}});
398398

399-
constexpr std::array<std::array<uint16_t, 16>, 359> case_mapper::lookup::stage3({{
399+
const std::array<std::array<uint16_t, 16>, 359> case_mapper::lookup::stage3({{
400400
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
401401
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 751}},
402402
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 751, 0}},
@@ -758,7 +758,7 @@ namespace sysstr::util::unicode
758758
{{ 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752}}
759759
}});
760760

761-
constexpr std::array<uint32_t, 754> case_mapper::lookup::stage4({{
761+
const std::array<uint32_t, 754> case_mapper::lookup::stage4({{
762762
0x00000000, 0x10000000, 0x10010F5C, 0x10100085, 0x10100086, 0x10100088, 0x10100089, 0x1010008A, 0x1010008B, 0x1010008C,
763763
0x1010008D, 0x1010008E, 0x1010008F, 0x10100090, 0x10100091, 0x10100092, 0x10100095, 0x10100096, 0x10100097, 0x10100099,
764764
0x1010009A, 0x1010009C, 0x101000A3, 0x101000A5, 0x101000A6, 0x101000A9, 0x101000AE, 0x101000B8, 0x10100111, 0x10100187,
@@ -838,7 +838,7 @@ namespace sysstr::util::unicode
838838
}});
839839

840840

841-
constexpr uint32_t normalizer::compositions[] = {
841+
const uint32_t normalizer::compositions[] = {
842842
0x2000003B, 0x0000003C, 0x20200338, 0x0000226E, 0x0000003D, 0x20200338, 0x00002260, 0x0000003E, 0x20200338, 0x0000226F,
843843
0x00000041, 0x1CC00300, 0x000000C0, 0x1CC00301, 0x000000C1, 0x1CC00302, 0x000000C2, 0x1CC00303, 0x000000C3, 0x1CC00308,
844844
0x000000C4, 0x1CC0030A, 0x000000C5, 0x1CC00304, 0x00000100, 0x1CC00306, 0x00000102, 0x19400328, 0x00000104, 0x1CC0030C,
@@ -1189,7 +1189,7 @@ namespace sysstr::util::unicode
11891189
0x200295B6, 0x20029B30, 0x2002A0CE, 0x2002A105, 0x2002A20E, 0x2002A291, 0x2002A392, 0x2002A600
11901190
};
11911191

1192-
constexpr uint32_t normalizer::values[] = {
1192+
const uint32_t normalizer::values[] = {
11931193
0x2100AFFF, 0x2200AFFF, 0x2300A332, 0x2400AFFF, 0x2500A33B, 0x2600A33E, 0x21032346, 0x2104AFFF, 0x2204AFFF, 0x2304A349,
11941194
0x2404AFFF, 0x2108EFFF, 0x2208EFFF, 0x2308EFFF, 0x2408E352, 0x210CFFFF, 0x210E2FFF, 0x220E2FFF, 0x230E2355, 0x240E235E,
11951195
0x250E2365, 0x21137FFF, 0x22137FFF, 0x23137FFF, 0x2413736B, 0x21175FFF, 0x21196FFF, 0x22196FFF, 0x23196374, 0x24196FFF,
@@ -1433,7 +1433,7 @@ namespace sysstr::util::unicode
14331433
0x80000D1B
14341434
};
14351435

1436-
constexpr std::array<uint16_t, 128> normalizer::lookup::ascii({{
1436+
const std::array<uint16_t, 128> normalizer::lookup::ascii({{
14371437
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
14381438
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
14391439
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
@@ -1445,7 +1445,7 @@ namespace sysstr::util::unicode
14451445
0x081C, 0x081C, 0x081C, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
14461446
}});
14471447

1448-
constexpr std::array<uint8_t, 2048> normalizer::lookup::stage1({{
1448+
const std::array<uint8_t, 2048> normalizer::lookup::stage1({{
14491449
22, 46, 49, 42, 41, 40, 30, 32, 37, 5, 0, 10, 21, 39, 33, 51, 52, 45, 0, 0, 0, 16, 13, 0, 36, 0, 0, 0, 0, 0,
14501450
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
14511451
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 44, 18, 0, 0, 0, 0,
@@ -1517,7 +1517,7 @@ namespace sysstr::util::unicode
15171517
0, 0, 0, 0, 0, 0, 0, 0
15181518
}});
15191519

1520-
constexpr std::array<std::array<uint16_t, 32>, 54> normalizer::lookup::stage2({{
1520+
const std::array<std::array<uint16_t, 32>, 54> normalizer::lookup::stage2({{
15211521
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
15221522
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16}},
15231523
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254}},
@@ -1574,7 +1574,7 @@ namespace sysstr::util::unicode
15741574
{{293, 296, 278, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 292, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
15751575
}});
15761576

1577-
constexpr std::array<std::array<uint16_t, 16>, 308> normalizer::lookup::stage3({{
1577+
const std::array<std::array<uint16_t, 16>, 308> normalizer::lookup::stage3({{
15781578
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
15791579
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 179}},
15801580
{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 439}},
@@ -1885,7 +1885,7 @@ namespace sysstr::util::unicode
18851885
{{495, 495, 478, 478, 436, 436, 436, 436, 488, 478, 478, 478, 478, 483, 483, 483}}
18861886
}});
18871887

1888-
constexpr std::array<uint16_t, 498> normalizer::lookup::stage4({{
1888+
const std::array<uint16_t, 498> normalizer::lookup::stage4({{
18891889
0x0000, 0x0009, 0x0060, 0x0064, 0x0068, 0x006D, 0x006F, 0x0072, 0x0074, 0x00C0, 0x00C1, 0x00C2, 0x00C4, 0x00C6, 0x00C7,
18901890
0x00C8, 0x00CA, 0x00CB, 0x00CD, 0x00CF, 0x00D2, 0x00D3, 0x00D7, 0x00DA, 0x00DC, 0x00DE, 0x00E1, 0x00ED, 0x00FF, 0x0104,
18911891
0x010C, 0x0128, 0x0129, 0x012B, 0x012E, 0x0130, 0x0132, 0x0138, 0x0152, 0x0156, 0x0164, 0x016A, 0x016F, 0x01C2, 0x01F4,

unicode/scripts/case_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ class props
188188

189189
def print_impl(self):
190190
ret = f'''
191-
constexpr char16_t case_mapper::cased_data[{self.__cased_data_len}] =
191+
const char16_t case_mapper::cased_data[{self.__cased_data_len}] =
192192
{indent_insert(format_utf16_string(self.__mapped_data), 12)};
193193
194194
{indent_insert(self.__builder.print_impl("case_mapper::lookup"), 8)}

unicode/scripts/lookup_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class {name}
5353

5454
def print_impl(self, name):
5555
ret = f'''
56-
constexpr char16_t {name}::chars[{self.length}] =
56+
const char16_t {name}::chars[{self.length}] =
5757
{indent_insert(format_utf16_string(self.chars), 12)};
5858
'''
5959
return dedent(ret)

unicode/scripts/norm_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,11 +391,11 @@ class normalizer
391391

392392
def print_impl(self):
393393
ret = f'''
394-
constexpr uint32_t normalizer::compositions[] = {{
394+
const uint32_t normalizer::compositions[] = {{
395395
{indent_insert(format_array(self.__compositions, ishex=True, bits=32), 12)}
396396
}};
397397
398-
constexpr uint32_t normalizer::values[] = {{
398+
const uint32_t normalizer::values[] = {{
399399
{indent_insert(format_array(self.__values, ishex=True, bits=32), 12)}
400400
}};
401401

unicode/scripts/trie_builder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,20 +211,20 @@ class {name}
211211

212212
def print_impl(self, name):
213213
ret = f'''
214-
constexpr std::array<{type_for_bits(self.__bits_for_ascii)}, {len(self.__ascii)}> {name}::ascii({{{{
214+
const std::array<{type_for_bits(self.__bits_for_ascii)}, {len(self.__ascii)}> {name}::ascii({{{{
215215
{indent_insert(format_array(self.__ascii, ishex=True, bits=self.__bits_for_ascii), 12)}
216216
}}}});
217217
'''
218218
for idx, values in enumerate(self.__values):
219219
if isinstance(values[0], int):
220220
ret += f'''
221-
constexpr std::array<{type_for_bits(self.__bits_for_values[idx])}, {len(values)}> {name}::stage{idx + 1}({{{{
221+
const std::array<{type_for_bits(self.__bits_for_values[idx])}, {len(values)}> {name}::stage{idx + 1}({{{{
222222
{indent_insert(format_array(values, ishex=idx!=0, bits=self.__bits_for_values[idx]), 12)}
223223
}}}});
224224
'''
225225
else:
226226
ret += f'''
227-
constexpr std::array<std::array<{type_for_bits(self.__bits_for_values[idx])}, {len(values[0])}>, {len(values)}> {name}::stage{idx + 1}({{{{
227+
const std::array<std::array<{type_for_bits(self.__bits_for_values[idx])}, {len(values[0])}>, {len(values)}> {name}::stage{idx + 1}({{{{
228228
{indent_insert(self.__make_nested(values, bits=self.__bits_for_values[idx]), 12)}
229229
}}}});
230230
'''

0 commit comments

Comments
 (0)