summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2021-09-09 18:28:28 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2021-09-10 19:33:06 +0200
commitce868ffb7c36b1109ac0554da4a853c62ce54037 (patch)
tree21aa323cad8ee2dc640852b3d02baa71775c33a1 /util
parent72338c12bc98ac1ad139436bedd422d61dd68291 (diff)
Remove trailing zero rows from qtimezoneprivate_data_p.h's tables
They are not needed. Iterations over the table track their sizes. The size-of-table constants just needed their -1s removed. Incidentally use std::size() rather than sizeof(array)/sizeof(element). Change-Id: Ie20eef9f6f5786d93c10b830a87e006d3c5bcc1a Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'util')
-rwxr-xr-xutil/locale_database/cldr2qtimezone.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/util/locale_database/cldr2qtimezone.py b/util/locale_database/cldr2qtimezone.py
index dec350fa8e..d0d48df6fe 100755
--- a/util/locale_database/cldr2qtimezone.py
+++ b/util/locale_database/cldr2qtimezone.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
#############################################################################
##
-## Copyright (C) 2020 The Qt Company Ltd.
+## Copyright (C) 2021 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is part of the test suite of the Qt Toolkit.
@@ -299,7 +299,6 @@ class ZoneIdWriter (SourceFileEditor):
data['windowsKey'], data['territoryId'],
ianaIdData.append(data['ianaList']),
data['windowsId'], data['territory']))
- out(' { 0, 0, 0 } // Trailing zeroes\n')
out('};\n\n')
# Write Windows ID key table
@@ -311,7 +310,6 @@ class ZoneIdWriter (SourceFileEditor):
windowsIdData.append(pair[0]),
ianaIdData.append(defaults[index]),
pair[1], pair[0]))
- out(' { 0, 0, 0, 0 } // Trailing zeroes\n')
out('};\n\n')
# Write UTC ID key table
@@ -320,7 +318,6 @@ class ZoneIdWriter (SourceFileEditor):
for pair in utcIdList:
out(' {{ {:6d},{:6d} }}, // {}\n'.format(
ianaIdData.append(pair[0]), pair[1], pair[0]))
- out(' { 0, 0 } // Trailing zeroes\n')
out('};\n')
return windowsIdData, ianaIdData