summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2011-11-02 14:55:17 +0100
committerDavid Tardon <dtardon@redhat.com>2011-11-02 14:56:19 +0100
commitb2e0b5f3f5b9a4c6b8483e6fb9855054c84aab92 (patch)
tree73a0fffd4c90ec3bd3ec4d8b039506f18b25dab0 /vcl
parent8c4b9f7c6bdecca8ec405272a23c7ca35ca0617e (diff)
use SAL_N_ELEMENTS
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/unx/salunx.h3
-rw-r--r--vcl/unx/generic/app/saldata.cxx2
2 files changed, 1 insertions, 4 deletions
diff --git a/vcl/inc/unx/salunx.h b/vcl/inc/unx/salunx.h
index e4150f0f7467..5082519b334d 100644
--- a/vcl/inc/unx/salunx.h
+++ b/vcl/inc/unx/salunx.h
@@ -33,9 +33,6 @@
#include <unx/svunx.h>
#include <unx/salstd.hxx>
-// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#define capacityof(a) (sizeof(a)/sizeof(*a))
-
// -=-= inlines =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
inline long Divide( long nDividend, long nDivisor )
{ return (nDividend + nDivisor/2) / nDivisor; }
diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx
index 8eb660202483..3f88f359f575 100644
--- a/vcl/unx/generic/app/saldata.cxx
+++ b/vcl/unx/generic/app/saldata.cxx
@@ -513,7 +513,7 @@ static void PrintXError( Display *pDisplay, XErrorEvent *pEvent )
XGetErrorText( pDisplay, pEvent->error_code, msg, sizeof( msg ) );
#endif
std::fprintf( stderr, "X-Error: %s\n", msg );
- if( pEvent->request_code < capacityof( XRequest ) )
+ if( pEvent->request_code < SAL_N_ELEMENTS( XRequest ) )
{
const char* pName = XRequest[pEvent->request_code];
if( !pName )