winemac: Change some run-time asserts to compile-time.

This commit is contained in:
Ken Thomases 2013-05-03 23:05:08 -05:00 committed by Alexandre Julliard
parent ce6a037abc
commit 3964f805cc
2 changed files with 3 additions and 4 deletions

View File

@ -37,6 +37,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(macdrv);
#define kCFCoreFoundationVersionNumber10_7 635.00
#endif
C_ASSERT(NUM_EVENT_TYPES <= sizeof(macdrv_event_mask) * 8);
DWORD thread_data_tls_index = TLS_OUT_OF_INDEXES;
@ -96,8 +98,6 @@ static BOOL process_attach(void)
SessionAttributeBits attributes;
OSStatus status;
assert(NUM_EVENT_TYPES <= sizeof(macdrv_event_mask) * 8);
status = SessionGetInfo(callerSecuritySession, NULL, &attributes);
if (status != noErr || !(attributes & sessionHasGraphicAccess))
return FALSE;

View File

@ -231,6 +231,7 @@ typedef union
pixel_format format;
UInt64 code;
} pixel_format_or_code;
C_ASSERT(sizeof(((pixel_format_or_code*)0)->format) <= sizeof(((pixel_format_or_code*)0)->code));
static pixel_format *pixel_formats;
@ -1080,8 +1081,6 @@ static BOOL init_pixel_formats(void)
TRACE("()\n");
assert(sizeof(((pixel_format_or_code*)0)->format) <= sizeof(((pixel_format_or_code*)0)->code));
err = CGLQueryRendererInfo(CGDisplayIDToOpenGLDisplayMask(CGMainDisplayID()), &renderer_info, &rendererCount);
if (err)
{