diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-14 11:31:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-15 08:24:33 +0200 |
commit | ec8c98f59869bee0e327d32f39480a0e4b1330bc (patch) | |
tree | ee68d29cd51c60a8a939fd454955410e66e3b66c /i18nutil/source | |
parent | 11503e99be09b4e8faa465559fbdacb06e8896cc (diff) |
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/source')
-rw-r--r-- | i18nutil/source/utility/widthfolding.cxx | 8 |
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; |