X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/15169ab34118dbc617d499b683adcb7e4f64a961..cb751f46a0db6efd12b1e8f9d1074e71b6249253:/src/mac/carbon/utils.cpp diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index b52a6a01b3..b690bac889 100644 --- a/src/mac/carbon/utils.cpp +++ b/src/mac/carbon/utils.cpp @@ -314,11 +314,12 @@ wxWindow* wxFindWindowAtPoint(const wxPoint& pt) wxString wxGetOsDescription() { - char data[128]; struct utsname name; uname(&name); - sprintf(data, "Mac OS X (%s %s %s)", name.sysname, name.release, name.machine); - return wxString(data, wxConvUTF8); + 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__ @@ -860,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() ; @@ -1559,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; } @@ -1567,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; }