path: root/src/corelib/text/qlocale_p.h
diff options
authorEdward Welbourne <>2020-01-09 20:47:23 +0100
committerEdward Welbourne <>2020-01-30 17:58:15 +0100
commit4e84a8b29f13169a75c734920e953d3157768bca (patch)
treed8d67c2a2f10ec11a1ecdf18898727a627611622 /src/corelib/text/qlocale_p.h
parent264ed73052513015caafaf146286cf63aaa68b03 (diff)
Deduplicate locale data tables
Some entries in tables were sub-strings (e.g. prefixes) of others. Since we store start-index and length (with no need for terminators), any entry that appears as a sub-string of an earlier entry can be recorded without making a separate copy of its content, just by recording where it appeared as a sub-string of an earlier entry. (Sadly this doesn't apply to month- or day-names and their short-forms: for those, we store ';'-joined lists. Thus, although each short-form is a prefix of its long-form, the short-form is stored in a list with other short-forms; and this is not a prefix of the list of matching long-forms.) The savings are modest (780 bytes at present), but cost us nothing except when running the python script that generates the data files (it takes a little longer now), which usually only happens at a CLDR update. Change-Id: I05bdaa9283365707bac0190ae983b31f074dd6ed Reviewed-by: Lars Knoll <>
Diffstat (limited to 'src/corelib/text/qlocale_p.h')
0 files changed, 0 insertions, 0 deletions