[Libreoffice-commits] core.git: i18npool/source

Eike Rathke erack at redhat.com
Wed Oct 25 09:51:56 UTC 2017


 i18npool/source/localedata/LocaleNode.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3df47db0f3974bdc32df66a57f8a8acd21acd0a8
Author: Eike Rathke <erack at redhat.com>
Date:   Tue Oct 24 21:54:32 2017 +0200

    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 at redhat.com>
    Tested-by: Jenkins <ci at libreoffice.org>

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");
 }
 
 


More information about the Libreoffice-commits mailing list