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 /vcl/aqua/source/window/salframeview.mm | |
parent | 309b89b93489c785a7ed2460ad5064ff0422dfd3 (diff) |
replace sizeof(foo)/sizeof(foo[0]) by SAL_N_ELEMENTS
Diffstat (limited to 'vcl/aqua/source/window/salframeview.mm')
-rwxr-xr-x | vcl/aqua/source/window/salframeview.mm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm index 2f9959ab43f4..ca9ef4a5e263 100755 --- a/vcl/aqua/source/window/salframeview.mm +++ b/vcl/aqua/source/window/salframeview.mm @@ -34,6 +34,7 @@ #include "salframeview.h" #include "aqua11yfactory.h" #include <sal/alloca.h> +#include <sal/macros.h> #include "vcl/window.hxx" #include "vcl/svapp.hxx" @@ -105,7 +106,7 @@ static USHORT ImplMapCharCode( sal_Unicode aCode ) }; USHORT nKeyCode = 0; - if( aCode < sizeof( aKeyCodeMap) / sizeof( aKeyCodeMap[0] ) ) + if( aCode < SAL_N_ELEMENTS( aKeyCodeMap) ) nKeyCode = aKeyCodeMap[ aCode ]; else if( aCode >= 0xf700 && aCode < 0xf780 ) nKeyCode = aFunctionKeyCodeMap[ aCode - 0xf700 ]; @@ -878,7 +879,7 @@ private: // Caution: should the table grow to more than 5 or 6 entries, // we must consider moving it to a kind of hash map - const unsigned int nExceptions = sizeof( aExceptionalKeys ) / sizeof( aExceptionalKeys[0] ); + const unsigned int nExceptions = SAL_N_ELEMENTS( aExceptionalKeys ); for( unsigned int i = 0; i < nExceptions; i++ ) { if( nKeyCode == aExceptionalKeys[i].nKeyCode && |