Fix compatibility with wxWidgets 3.0.x

Fixes #8533
https://gitlab.com/kicad/code/kicad/issues/8533
This commit is contained in:
jean-pierre charras 2021-06-02 09:58:19 +02:00
parent eeb405c196
commit b6de4da686
1 changed files with 6 additions and 1 deletions

View File

@ -29,9 +29,14 @@
#include <math/util.h>
#include <wx/log.h>
// Fix compatibility with wxWidgets version < 3.1.4
#ifndef wxASCII_STR
#define wxASCII_STR(s) wxString::FromAscii(s)
#endif
void kimathLogDebug( const char* aFormatString, ... )
{
if( wxLog::IsLevelEnabled( wxLOG_Debug, wxASCII_STR( wxLOG_COMPONENT ) ) )
if( wxLog::IsLevelEnabled( wxLOG_Debug, wxString::FromAscii( wxLOG_COMPONENT ) ) )
{
va_list argList;
va_start( argList, aFormatString );