From 2c3d0ff9f83aab89980529da2aa3837390b84ef7 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Tue, 10 Jan 2012 16:00:18 +0100 Subject: Use SAL_N_ELEMENTS Some more like Thorstens diff 9c59cd15b150638c845bbc275b9b04460afc23bd Done with some regex magic (and a check if this var is an array): s/sizeof\(\s*$var\s*\)\s*\/\s*sizeof\(\s*\*$var\s*/SAL_N_ELEMENTS\($var/gs --- unotools/source/misc/fontdefs.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'unotools') diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx index aad3670570a8..cca8040c5bf6 100644 --- a/unotools/source/misc/fontdefs.cxx +++ b/unotools/source/misc/fontdefs.cxx @@ -420,7 +420,7 @@ void GetEnglishSearchFontName( String& rName ) if( bNeedTranslation ) { typedef boost::unordered_map FontNameDictionary; - static FontNameDictionary aDictionary( sizeof(aImplLocalizedNamesList) / sizeof(*aImplLocalizedNamesList) ); + static FontNameDictionary aDictionary( SAL_N_ELEMENTS(aImplLocalizedNamesList) ); // the font name dictionary needs to be intialized once if( aDictionary.empty() ) { -- cgit v1.2.3