diff options
author | Eike Rathke <erack@redhat.com> | 2017-10-24 21:54:32 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-10-25 11:51:35 +0200 |
commit | 3df47db0f3974bdc32df66a57f8a8acd21acd0a8 (patch) | |
tree | 1687ab8e1582513d22fcd9062ab38f3eabc9363e /i18npool | |
parent | 4216d6f590141df7403da65110574c2369b04ed8 (diff) |
Always generate count number of elements in locale data arrays
Change-Id: I6fecfb24bced7d6e747175befe423060d5ea445b
Reviewed-on: https://gerrit.libreoffice.org/43793
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/localedata/LocaleNode.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 5d3e29a3531c..9dc9b07ec91b 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -351,7 +351,7 @@ void LCInfoNode::generateCode (const OFileWriter &of) const of.writeAsciiString("\tcountryDefaultName,\n"); of.writeAsciiString("\tVariant\n"); of.writeAsciiString("};\n\n"); - of.writeFunction("getLCInfo_", "0", "LCInfoArray"); + of.writeFunction("getLCInfo_", "(sizeof(LCInfoArray)/sizeof(LCInfoArray[0]))", "LCInfoArray"); } @@ -574,7 +574,7 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const of.writeAsciiString("\tLongDateMonthSeparator,\n"); of.writeAsciiString("\tLongDateYearSeparator\n"); of.writeAsciiString("};\n\n"); - of.writeFunction("getLocaleItem_", "0", "LCType"); + of.writeFunction("getLocaleItem_", "(sizeof(LCType)/sizeof(LCType[0]))", "LCType"); } |