From: Paul Cornett Date: Wed, 3 May 2006 04:12:48 +0000 (+0000) Subject: wxASSERT(false) --> wxFAIL X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4362c7052b045f2ae743057d0fe8a17e053894cd wxASSERT(false) --> wxFAIL git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index fc33eb7272..f70b797e3f 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -284,7 +284,7 @@ wxString wxFileConfig::GetGlobalDir() strDir.Printf(wxT("%c:\\OS2\\"), 'A'+drive-1); } #elif defined(__WXSTUBS__) - wxASSERT_MSG( false, wxT("TODO") ) ; + wxFAIL_MSG( wxT("TODO") ); #elif defined(__DOS__) // There's no such thing as global cfg dir in MS-DOS, let's return // current directory (FIXME_MGL?) diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 877082cdc6..a28e6741a1 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -676,7 +676,7 @@ wxTopLevelWindowGTK::~wxTopLevelWindowGTK() { if (m_grabbed) { - wxASSERT_MSG( false, _T("Window still grabbed")); + wxFAIL_MSG(_T("Window still grabbed")); RemoveGrab(); } diff --git a/src/mac/carbon/mimetmac.cpp b/src/mac/carbon/mimetmac.cpp index 173f3d5f55..4ee87964e6 100644 --- a/src/mac/carbon/mimetmac.cpp +++ b/src/mac/carbon/mimetmac.cpp @@ -630,7 +630,7 @@ void wxMimeTypesManagerImpl::Initialize(int mailcapStyles, const wxString& extra if (status != noErr) { wxLogDebug(wxT("Could not initialize wxMimeTypesManager!")); - wxASSERT( false ); + wxFAIL; m_hIC = NULL; return; diff --git a/src/mac/carbon/toolbar.cpp b/src/mac/carbon/toolbar.cpp index 11fae3b2ff..5c7934010e 100644 --- a/src/mac/carbon/toolbar.cpp +++ b/src/mac/carbon/toolbar.cpp @@ -907,7 +907,7 @@ bool wxToolBar::Realize() if (err != noErr) { wxString errMsg = wxString::Format( wxT("HIToolbarRemoveItemAtIndex failed [%ld]"), (long)err ); - wxASSERT_MSG( 0, errMsg.c_str() ); + wxFAIL_MSG( errMsg.c_str() ); } } @@ -915,7 +915,7 @@ bool wxToolBar::Realize() if (err != noErr) { wxString errMsg = wxString::Format( wxT("HIToolbarInsertItemAtIndex failed [%ld]"), (long)err ); - wxASSERT_MSG( 0, errMsg.c_str() ); + wxFAIL_MSG( errMsg.c_str() ); } tool->SetIndex( currentPosition ); @@ -1265,7 +1265,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase) else { wxString errMsg = wxString::Format( wxT("wxToolBar::DoInsertTool - failure [%ld]"), (long)err ); - wxASSERT_MSG( false, errMsg.c_str() ); + wxFAIL_MSG( errMsg.c_str() ); } return (err == noErr); diff --git a/src/unix/mimetype.cpp b/src/unix/mimetype.cpp index af9e6ea701..0dc66b58f8 100644 --- a/src/unix/mimetype.cpp +++ b/src/unix/mimetype.cpp @@ -1434,7 +1434,7 @@ bool wxMimeTypesManagerImpl::WriteToMimeTypes(int index, bool delete_index) nIndex = file.pIndexOf(wxT("#--Netscape")); if (nIndex != wxNOT_FOUND) { - wxASSERT_MSG(false,wxT("Error in .mime.types \nTrying to mix Netscape and Metamail formats\nFile not modiifed")); + wxFAIL_MSG(wxT("Error in .mime.types\nTrying to mix Netscape and Metamail formats\nFile not modified")); return false; } @@ -1501,7 +1501,7 @@ bool wxMimeTypesManagerImpl::WriteToNSMimeTypes(int index, bool delete_index) // metamail entreies if (file.GetLineCount() > 0) { - wxASSERT_MSG(false, wxT(".mime.types File not in Netscape format\nNo entries written to\n.mime.types or to .mailcap")); + wxFAIL_MSG(wxT(".mime.types File not in Netscape format\nNo entries written to\n.mime.types or to .mailcap")); return false; } diff --git a/src/x11/window.cpp b/src/x11/window.cpp index e5080dae51..bbc7c1d7b2 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -484,7 +484,7 @@ void wxWindowX11::DoCaptureMouse() { if ((g_captureWindow != NULL) && (g_captureWindow != this)) { - wxASSERT_MSG(false, wxT("Trying to capture before mouse released.")); + wxFAIL_MSG(wxT("Trying to capture before mouse released.")); // Core dump now int *tmp = NULL;