From ab3837f86f84fc92b13ad0a79f6d41ba6252deb5 Mon Sep 17 00:00:00 2001 From: John Layt Date: Sat, 31 Mar 2012 21:14:20 +0100 Subject: QLocale: Merge month name data storage to save 50KB memory Month Names and Standalone Month Names are stored separately, but for majority of locales the names are the same and so storage is duplicated. By storing both sets of names in the same array 50KB is saved in libQtCore.so on Linux. Depends on change Ic84bbc82 in branch api_review for CLDR 1.9.1 Change-Id: I83224ebc2180ee6de69797fa50d38348acc94107 Reviewed-by: Denis Dzyubenko --- util/local_database/qlocalexml2cpp.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'util') diff --git a/util/local_database/qlocalexml2cpp.py b/util/local_database/qlocalexml2cpp.py index 89f79c984e..3cb2b982e5 100755 --- a/util/local_database/qlocalexml2cpp.py +++ b/util/local_database/qlocalexml2cpp.py @@ -504,7 +504,6 @@ def main(): date_format_data = StringData() time_format_data = StringData() months_data = StringData() - standalone_months_data = StringData() days_data = StringData() am_data = StringData() pm_data = StringData() @@ -546,9 +545,9 @@ def main(): date_format_data.append(l.longDateFormat), time_format_data.append(l.shortTimeFormat), time_format_data.append(l.longTimeFormat), - standalone_months_data.append(l.standaloneShortMonths), - standalone_months_data.append(l.standaloneLongMonths), - standalone_months_data.append(l.standaloneNarrowMonths), + months_data.append(l.standaloneShortMonths), + months_data.append(l.standaloneLongMonths), + months_data.append(l.standaloneNarrowMonths), months_data.append(l.shortMonths), months_data.append(l.longMonths), months_data.append(l.narrowMonths), @@ -612,14 +611,6 @@ def main(): data_temp_file.write("\n") - # Standalone months data - #check_static_char_array_length("standalone_months", standalone_months_data.data) - data_temp_file.write("static const ushort standalone_months_data[] = {\n") - data_temp_file.write(wrap_list(standalone_months_data.data)) - data_temp_file.write("\n};\n") - - data_temp_file.write("\n") - # Days data #check_static_char_array_length("days", days_data.data) data_temp_file.write("static const ushort days_data[] = {\n") -- cgit v1.2.3