X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0c133e13b36a923c65f94499554e432bc3a0daa..33820d94285c0004acce756e7d10d9698e6387d1:/src/osx/core/display.cpp diff --git a/src/osx/core/display.cpp b/src/osx/core/display.cpp index 4598f001e9..c7674ea5db 100644 --- a/src/osx/core/display.cpp +++ b/src/osx/core/display.cpp @@ -86,12 +86,9 @@ protected: unsigned wxDisplayFactoryMacOSX::GetCount() { CGDisplayCount count; -#ifdef __WXDEBUG__ - CGDisplayErr err = -#endif - CGGetActiveDisplayList(0, NULL, &count); + CGDisplayErr err = CGGetActiveDisplayList(0, NULL, &count); - wxASSERT(err == CGDisplayNoErr); + wxCHECK_MSG( err == CGDisplayNoErr, 0, "CGGetActiveDisplayList() failed" ); return count; } @@ -136,12 +133,9 @@ wxDisplayImpl *wxDisplayFactoryMacOSX::CreateDisplay(unsigned n) CGDisplayCount theCount = GetCount(); CGDirectDisplayID* theIDs = new CGDirectDisplayID[theCount]; -#ifdef __WXDEBUG__ - CGDisplayErr err = -#endif - CGGetActiveDisplayList(theCount, theIDs, &theCount); + CGDisplayErr err = CGGetActiveDisplayList(theCount, theIDs, &theCount); + wxCHECK_MSG( err == CGDisplayNoErr, NULL, "CGGetActiveDisplayList() failed" ); - wxASSERT( err == CGDisplayNoErr ); wxASSERT( n < theCount ); wxDisplayImplMacOSX *display = new wxDisplayImplMacOSX(n, theIDs[n]);