]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/display.mm
Reflect changes in stc.cpp in stc.cpp.in from which it's generated.
[wxWidgets.git] / src / cocoa / display.mm
index 3e375d45c956487335f7d84073e9dccdcae265a6..721fe3b42590607bc5a405cba0b7922fe81491bf 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Ryan Norton
 // Modified by:
 // Created:     2004-10-03
-// RCS-ID:      $Id$
 // Copyright:   (c) Ryan Norton
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -53,7 +52,7 @@ public:
 private:
     CGDirectDisplayID m_id;
 
-    DECLARE_NO_COPY_CLASS(wxDisplayImplMacOSX)
+    wxDECLARE_NO_COPY_CLASS(wxDisplayImplMacOSX);
 };
 
 class wxDisplayFactoryMacOSX : public wxDisplayFactory
@@ -66,7 +65,7 @@ public:
     virtual int GetFromPoint(const wxPoint& pt);
 
 protected:
-    DECLARE_NO_COPY_CLASS(wxDisplayFactoryMacOSX)
+    wxDECLARE_NO_COPY_CLASS(wxDisplayFactoryMacOSX);
 };
 
 // ============================================================================
@@ -76,12 +75,8 @@ protected:
 unsigned wxDisplayFactoryMacOSX::GetCount()
 {
     CGDisplayCount count;
-#ifdef __WXDEBUG__
-    CGDisplayErr err =
-#endif
-    CGGetActiveDisplayList(0, NULL, &count);
-
-    wxASSERT(err == CGDisplayNoErr);
+    CGDisplayErr err = CGGetActiveDisplayList(0, NULL, &count);
+    wxCHECK_MSG( err != CGDisplayNoErr, 0, "CGGetActiveDisplayList() failed" );
 
     return count;
 }
@@ -126,12 +121,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]);