X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/297218f05abc1432f355522f891145e58b9104d4..9534c0039b9d708c7c0ab961f74c1b14f3bfec4c:/src/mac/carbon/utils.cpp diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index e302a68cdd..b690bac889 100644 --- a/src/mac/carbon/utils.cpp +++ b/src/mac/carbon/utils.cpp @@ -314,13 +314,12 @@ wxWindow* wxFindWindowAtPoint(const wxPoint& pt) wxString wxGetOsDescription() { - char data[128]; struct utsname name; uname(&name); - return wxString::Format(_T("Mac OS X (%s %s %s)"), - wxString::FromAscii(name.sysname).c_str(), - wxString::FromAscii(name.release).c_str(), - wxString::FromAscii(name.machine).c_str()); + return wxString::Format(_T("Mac OS X (%s %s %s)"), + wxString::FromAscii(name.sysname).c_str(), + wxString::FromAscii(name.release).c_str(), + wxString::FromAscii(name.machine).c_str()); } #ifndef __DARWIN__ @@ -862,7 +861,7 @@ void wxMacControl::GetRectInWindowCoords( Rect *r ) WindowRef tlwref = GetControlOwner( m_controlRef ) ; - wxTopLevelWindowMac* tlwwx = wxFindWinFromMacWindow( tlwref ) ; + wxNonOwnedWindow* tlwwx = wxFindWinFromMacWindow( tlwref ) ; if ( tlwwx != NULL ) { ControlRef rootControl = tlwwx->GetPeer()->GetControlRef() ; @@ -1561,7 +1560,7 @@ unsigned int wxMacDataItemBrowserControl::GetLineFromItem(const wxMacDataItem* i { DataBrowserTableViewRowIndex row; OSStatus err = GetItemRow( (DataBrowserItemID) item , &row); - wxASSERT( err == noErr); + wxCHECK( err == noErr, (unsigned)-1 ); return row; } @@ -1569,7 +1568,7 @@ wxMacDataItem* wxMacDataItemBrowserControl::GetItemFromLine(unsigned int n) con { DataBrowserItemID id; OSStatus err = GetItemID( (DataBrowserTableViewRowIndex) n , &id); - wxASSERT( err == noErr); + wxCHECK( err == noErr, NULL ); return (wxMacDataItem*) id; }