private:
CGDirectDisplayID m_id;
- DECLARE_NO_COPY_CLASS(wxDisplayImplMacOSX)
+ wxDECLARE_NO_COPY_CLASS(wxDisplayImplMacOSX);
};
class wxDisplayFactoryMacOSX : public wxDisplayFactory
virtual int GetFromPoint(const wxPoint& pt);
protected:
- DECLARE_NO_COPY_CLASS(wxDisplayFactoryMacOSX)
+ wxDECLARE_NO_COPY_CLASS(wxDisplayFactoryMacOSX);
};
// ============================================================================
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;
}
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]);