[Libreoffice-commits] .: vcl/inc vcl/unx

David Tardon dtardon at kemper.freedesktop.org
Wed Nov 2 06:56:28 PDT 2011


 vcl/inc/unx/salunx.h            |    3 ---
 vcl/unx/generic/app/saldata.cxx |    2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

New commits:
commit b2e0b5f3f5b9a4c6b8483e6fb9855054c84aab92
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Nov 2 14:55:17 2011 +0100

    use SAL_N_ELEMENTS

diff --git a/vcl/inc/unx/salunx.h b/vcl/inc/unx/salunx.h
index e4150f0..5082519 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 8eb6602..3f88f35 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 )


More information about the Libreoffice-commits mailing list