]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/core/display.cpp
replace more __WXDEBUG__ occurrences with wxDEBUG_LEVEL
[wxWidgets.git] / src / osx / core / display.cpp
index 4598f001e9213dbf110abafa09b05551a8f48ebd..4160d73acf260b67926e53b96bfd584a5cd5dda4 100644 (file)
@@ -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]);