diff options
author | Kenneth Venken <kenneth.venken@gmail.com> | 2010-10-18 12:28:33 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2010-10-18 12:28:33 +0200 |
commit | bbe30ed8144fbfee7500b98a67224731c581663e (patch) | |
tree | 69c3c4238eb51d2be523c9eb9e1e2a498c36b9cf /i18npool/source/nativenumber | |
parent | 309b89b93489c785a7ed2460ad5064ff0422dfd3 (diff) |
replace sizeof(foo)/sizeof(foo[0]) by SAL_N_ELEMENTS
Diffstat (limited to 'i18npool/source/nativenumber')
-rw-r--r-- | i18npool/source/nativenumber/nativenumbersupplier.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx index 29d2f6c41adf..5044b6cc1e2f 100644 --- a/i18npool/source/nativenumber/nativenumbersupplier.cxx +++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx @@ -30,6 +30,7 @@ #include "precompiled_i18npool.hxx" #include <rtl/ustrbuf.hxx> +#include <sal/macros.h> #include <nativenumbersupplier.hxx> #include <localedata.hxx> #include <data/numberchar.h> @@ -466,7 +467,7 @@ static const sal_Char *natnum1Locales[] = { "dz", "fa" }; -static sal_Int16 nbOfLocale = sizeof(natnum1Locales)/sizeof(natnum1Locales[0]); +static sal_Int16 nbOfLocale = SAL_N_ELEMENTS(natnum1Locales); //! ATTENTION: Do not change order of elements! //! Number and order must match elements of natnum1Locales! @@ -497,7 +498,7 @@ static sal_Int16 natnum1[] = { NumberChar_dz, NumberChar_EastIndic_ar }; -static sal_Int16 sizeof_natnum1 = sizeof(natnum1)/sizeof(natnum1[0]); +static sal_Int16 sizeof_natnum1 = SAL_N_ELEMENTS(natnum1); //! ATTENTION: Do not change order of elements! //! Order must match first elements of natnum1Locales! @@ -508,7 +509,7 @@ static sal_Int16 natnum2[] = { NumberChar_Upper_ko, NumberChar_he }; -static sal_Int16 sizeof_natnum2 = sizeof(natnum2)/sizeof(natnum2[0]); +static sal_Int16 sizeof_natnum2 = SAL_N_ELEMENTS(natnum2); #define isLang(lang) rLocale.Language.equalsAsciiL(lang, 2) #define isCtry(ctry) rLocale.Country.equalsAsciiL(ctry, 2) |