diff options
Diffstat (limited to 'vcl/unx/source/app/wmadaptor.cxx')
-rw-r--r-- | vcl/unx/source/app/wmadaptor.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/unx/source/app/wmadaptor.cxx b/vcl/unx/source/app/wmadaptor.cxx index 77ae674bd36e..955d7098192f 100644 --- a/vcl/unx/source/app/wmadaptor.cxx +++ b/vcl/unx/source/app/wmadaptor.cxx @@ -41,6 +41,7 @@ #include <osl/thread.h> #include <rtl/locale.h> #include <osl/process.h> +#include <sal/macros.h> #include <tools/prex.h> #include <X11/X.h> @@ -493,7 +494,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) : WMAdaptorProtocol* pMatch = (WMAdaptorProtocol*) bsearch( &aSearch, aProtocolTab, - sizeof( aProtocolTab )/sizeof( aProtocolTab[0] ), + SAL_N_ELEMENTS( aProtocolTab ), sizeof( struct WMAdaptorProtocol ), compareProtocol ); if( pMatch ) @@ -749,7 +750,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) : WMAdaptorProtocol* pMatch = (WMAdaptorProtocol*) bsearch( &aSearch, aProtocolTab, - sizeof( aProtocolTab )/sizeof( aProtocolTab[0] ), + SAL_N_ELEMENTS( aProtocolTab ), sizeof( struct WMAdaptorProtocol ), compareProtocol ); if( pMatch ) @@ -1006,7 +1007,7 @@ bool GnomeWMAdaptor::isValid() const void WMAdaptor::initAtoms() { // get basic atoms - for( unsigned int i = 0; i < sizeof( aAtomTab )/sizeof( aAtomTab[0] ); i++ ) + for( unsigned int i = 0; i < SAL_N_ELEMENTS( aAtomTab ); i++ ) m_aWMAtoms[ aAtomTab[i].nProtocol ] = XInternAtom( m_pDisplay, aAtomTab[i].pProtocol, False ); m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ] = XInternAtom( m_pDisplay, "_NET_SUPPORTING_WM_CHECK", True ); m_aWMAtoms[ NET_WM_NAME ] = XInternAtom( m_pDisplay, "_NET_WM_NAME", True ); |