summaryrefslogtreecommitdiffstats
path: root/i18nutil
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-14 11:31:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-15 08:24:33 +0200
commitec8c98f59869bee0e327d32f39480a0e4b1330bc (patch)
treeee68d29cd51c60a8a939fd454955410e66e3b66c /i18nutil
parentUpdated core (diff)
downloadcore-ec8c98f59869bee0e327d32f39480a0e4b1330bc.tar.gz
core-ec8c98f59869bee0e327d32f39480a0e4b1330bc.zip
use more SAL_N_ELEMENTS part 3
Change-Id: I82e366fefd2e31928b99840fe76649cc3521e623 Reviewed-on: https://gerrit.libreoffice.org/38789 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18nutil')
-rw-r--r--i18nutil/source/utility/widthfolding.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/i18nutil/source/utility/widthfolding.cxx b/i18nutil/source/utility/widthfolding.cxx
index acc413598613..3b948025e318 100644
--- a/i18nutil/source/utility/widthfolding.cxx
+++ b/i18nutil/source/utility/widthfolding.cxx
@@ -220,9 +220,7 @@ oneToOneMapping& widthfolding::getfull2halfTableForASC()
//
// See the following page for detail:
// http://wiki.openoffice.org/wiki/Calc/Features/JIS_and_ASC_functions
- int i, j;
- int n = sizeof(full2halfASCException) / sizeof(UnicodePairWithFlag);
- for( i = 0; i < n; i++ )
+ for( int i = 0; i < int(SAL_N_ELEMENTS(full2halfASCException)); i++ )
{
const int high = (full2halfASCException[i].first >> 8) & 0xFF;
const int low = (full2halfASCException[i].first) & 0xFF;
@@ -231,7 +229,7 @@ oneToOneMapping& widthfolding::getfull2halfTableForASC()
{
table.mpIndex[high] = new UnicodePairWithFlag*[256];
- for( j = 0; j < 256; j++ )
+ for( int j = 0; j < 256; j++ )
table.mpIndex[high][j] = nullptr;
}
table.mpIndex[high][low] = &full2halfASCException[i];
@@ -255,7 +253,7 @@ oneToOneMapping& widthfolding::gethalf2fullTableForJIS()
// See the following page for detail:
// http://wiki.openoffice.org/wiki/Calc/Features/JIS_and_ASC_functions
int i, j;
- int n = sizeof(half2fullJISException) / sizeof(UnicodePairWithFlag);
+ int n = SAL_N_ELEMENTS(half2fullJISException);
for( i = 0; i < n; i++ )
{
const int high = (half2fullJISException[i].first >> 8) & 0xFF;