From: George Tasker Date: Mon, 3 Dec 2001 10:54:59 +0000 (+0000) Subject: Changed all the wxASSERT(0) calls to use wxFAIL_MSG() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3a87625f685147ac659a5093c70f030f6ea67a02 Changed all the wxASSERT(0) calls to use wxFAIL_MSG() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/utils/HelpGen/src/ifcontext.cpp b/utils/HelpGen/src/ifcontext.cpp index 295aab86dc..79f9c72a44 100644 --- a/utils/HelpGen/src/ifcontext.cpp +++ b/utils/HelpGen/src/ifcontext.cpp @@ -35,11 +35,12 @@ size_t spInterFileContext::GetFileNo( const string& fname ) { - for( size_t i = 0; i != mFiles.size(); ++i ) - - if ( fname == mFiles[i] ) return i; + size_t i; + for ( i = 0; i != mFiles.size(); ++i ) + if ( fname == mFiles[i] ) + return i; - wxASSERT(0); // DBG:: + wxFAIL_MSG("File not found in array in function spInterFileContext::GetFileNo()"); return 0; } @@ -119,8 +120,8 @@ void spInterFileContext::DoAppendSourceFragment( string& source, if ( cur >= pos + len ) // check if we've overstepped the current source-fragment { - wxASSERT(0); // DBG:: with current imp. this should not happen - +// wxASSERT(0); // DBG:: with current imp. this should not happen + wxFAIL_MSG("Overstepped the current source fragment in function\nspInterFileContext::DoAppendSourceFragment()"); cur = pos + len; break; } } diff --git a/utils/HelpGen/src/srcparser.cpp b/utils/HelpGen/src/srcparser.cpp index 5406889401..b0c12f40f4 100644 --- a/utils/HelpGen/src/srcparser.cpp +++ b/utils/HelpGen/src/srcparser.cpp @@ -346,7 +346,7 @@ void spContext::RemoveThisContext() mpParent->RemoveChild( this ); else // context should have a parent - wxASSERT(0); + wxFAIL_MSG("Context should have a parent"); } spContext* spContext::GetOutterContext()