Browse Source

Move the custom assert handler to release builds only

newinvert
Mark Roszko 3 years ago
parent
commit
03990ee7e0
  1. 4
      common/single_top.cpp
  2. 5
      kicad/kicad.cpp

4
common/single_top.cpp

@ -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() )

5
kicad/kicad.cpp

@ -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…
Cancel
Save