]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/core/display.cpp
Setting eol-style property to CRLF for some project files.
[wxWidgets.git] / src / osx / core / display.cpp
index 45dcdd802f1c46a8bc3fcb7d2e27064b39fc999f..c7674ea5dba814ddf3345b277b733c0e09002f0b 100644 (file)
@@ -63,7 +63,7 @@ public:
 private:
     CGDirectDisplayID m_id;
 
-    DECLARE_NO_COPY_CLASS(wxDisplayImplMacOSX)
+    wxDECLARE_NO_COPY_CLASS(wxDisplayImplMacOSX);
 };
 
 class wxDisplayFactoryMacOSX : public wxDisplayFactory
@@ -76,7 +76,7 @@ public:
     virtual int GetFromPoint(const wxPoint& pt);
 
 protected:
-    DECLARE_NO_COPY_CLASS(wxDisplayFactoryMacOSX)
+    wxDECLARE_NO_COPY_CLASS(wxDisplayFactoryMacOSX);
 };
 
 // ============================================================================
@@ -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]);