#ifdef __WXDEBUG__
+// wxASSERT() helper
+bool wxAssertIsEqual(int x, int y)
+{
+ return x == y;
+}
+
// break into the debugger
-void Trap()
+void wxTrap()
{
#ifdef __WXMSW__
DebugBreak();
if ( s_bInAssert ) {
// He-e-e-e-elp!! we're trapped in endless loop
- Trap();
+ wxTrap();
s_bInAssert = FALSE;
// send it to the normal log destination
wxLogDebug(szBuf);
-#if wxUSE_GUI || defined(__WXMSW__)
+#if (wxUSE_GUI && wxUSE_MSGDLG) || defined(__WXMSW__)
// this message is intentionally not translated - it is for
// developpers only
wxStrcat(szBuf, wxT("\nDo you want to stop the program?\nYou can also choose [Cancel] to suppress further warnings."));
switch ( ::MessageBox(NULL, szBuf, _T("Debug"),
MB_YESNOCANCEL | MB_ICONSTOP ) ) {
case IDYES:
- Trap();
+ wxTrap();
break;
case IDCANCEL:
switch ( wxMessageBox(szBuf, wxT("Debug"),
wxYES_NO | wxCANCEL | wxICON_STOP ) ) {
case wxYES:
- Trap();
+ wxTrap();
break;
case wxCANCEL:
#endif // GUI or MSW
#else // !GUI
- Trap();
+ wxTrap();
#endif // GUI/!GUI
}