Move the custom assert handler to release builds only
This commit is contained in:
parent
4f39cb0789
commit
03990ee7e0
|
@ -133,6 +133,7 @@ private:
|
|||
};
|
||||
wxIMPLEMENT_DYNAMIC_CLASS(HtmlModule, wxModule);
|
||||
|
||||
#ifdef NDEBUG
|
||||
// Define a custom assertion handler
|
||||
void CustomAssertHandler(const wxString& file,
|
||||
int line,
|
||||
|
@ -142,6 +143,7 @@ void CustomAssertHandler(const wxString& file,
|
|||
{
|
||||
Pgm().HandleAssert( file, line, func, cond, msg );
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Struct APP_SINGLE_TOP
|
||||
|
@ -162,9 +164,9 @@ struct APP_SINGLE_TOP : public wxApp
|
|||
#ifdef NDEBUG
|
||||
// These checks generate extra assert noise
|
||||
wxSizerFlags::DisableConsistencyChecks();
|
||||
#endif
|
||||
wxDISABLE_DEBUG_SUPPORT();
|
||||
wxSetAssertHandler( CustomAssertHandler );
|
||||
#endif
|
||||
|
||||
// Perform platform-specific init tasks
|
||||
if( !KIPLATFORM::APP::Init() )
|
||||
|
|
|
@ -406,7 +406,7 @@ void PGM_KICAD::Destroy()
|
|||
|
||||
KIWAY Kiway( &Pgm(), KFCTL_CPP_PROJECT_SUITE );
|
||||
|
||||
|
||||
#ifdef NDEBUG
|
||||
// Define a custom assertion handler
|
||||
void CustomAssertHandler(const wxString& file,
|
||||
int line,
|
||||
|
@ -416,6 +416,7 @@ void CustomAssertHandler(const wxString& file,
|
|||
{
|
||||
Pgm().HandleAssert( file, line, func, cond, msg );
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Not publicly visible because most of the action is in #PGM_KICAD these days.
|
||||
|
@ -434,9 +435,9 @@ struct APP_KICAD : public wxApp
|
|||
#ifdef NDEBUG
|
||||
// These checks generate extra assert noise
|
||||
wxSizerFlags::DisableConsistencyChecks();
|
||||
#endif
|
||||
wxDISABLE_DEBUG_SUPPORT();
|
||||
wxSetAssertHandler( CustomAssertHandler );
|
||||
#endif
|
||||
|
||||
// Perform platform-specific init tasks
|
||||
if( !KIPLATFORM::APP::Init() )
|
||||
|
|
Loading…
Reference in New Issue