diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-14 09:35:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-14 14:17:14 +0200 |
commit | b70fa47aec65fe95da94fc17640dda27650e9677 (patch) | |
tree | 7e54f37342fd57c324f43d54659335554a9c8e72 /vcl/source/font | |
parent | 6db84250d1c4e7ec5a54ff75e124ea9a84ff89d9 (diff) |
use more SAL_N_ELEMENTS part 1
- teach comphelper::containerToSequence to handle sized arrays
- also use range based for-loop where appropriate.
Change-Id: I73ba9b6295e7b29c872ee53de7a9340969e07f99
Reviewed-on: https://gerrit.libreoffice.org/38769
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/font')
-rw-r--r-- | vcl/source/font/fontcharmap.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx index f30c4e670242..b1a6fef9d4ff 100644 --- a/vcl/source/font/fontcharmap.cxx +++ b/vcl/source/font/fontcharmap.cxx @@ -64,11 +64,11 @@ ImplFontCharMap::ImplFontCharMap( const CmapResult& rCR ) ImplFontCharMapRef const & ImplFontCharMap::getDefaultMap( bool bSymbols ) { const sal_UCS4* pRangeCodes = aDefaultUnicodeRanges; - int nCodesCount = sizeof(aDefaultUnicodeRanges) / sizeof(*pRangeCodes); + int nCodesCount = SAL_N_ELEMENTS(aDefaultUnicodeRanges); if( bSymbols ) { pRangeCodes = aDefaultSymbolRanges; - nCodesCount = sizeof(aDefaultSymbolRanges) / sizeof(*pRangeCodes); + nCodesCount = SAL_N_ELEMENTS(aDefaultSymbolRanges); } CmapResult aDefaultCR( bSymbols, pRangeCodes, nCodesCount/2 ); |