Kaydet (Commit) b2e0b5f3 authored tarafından David Tardon's avatar David Tardon

use SAL_N_ELEMENTS

üst 8c4b9f7c
......@@ -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; }
......
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment