Don't evaluate arguments passed to KI_TRACE if tracing is disabled.
This commit is contained in:
@@ -292,17 +292,27 @@ TRACE_MANAGER& TRACE_MANAGER::Instance()
|
||||
return *self;
|
||||
}
|
||||
|
||||
void TRACE_MANAGER::traceV( const wxString& aWhat, const wxString& aFmt, va_list vargs )
|
||||
|
||||
bool TRACE_MANAGER::IsTraceEnabled( const wxString& aWhat )
|
||||
{
|
||||
if( !m_printAllTraces )
|
||||
{
|
||||
if( !m_globalTraceEnabled )
|
||||
return;
|
||||
return false;
|
||||
|
||||
if( m_enabledTraces.find( aWhat ) == m_enabledTraces.end() )
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void TRACE_MANAGER::traceV( const wxString& aWhat, const wxString& aFmt, va_list vargs )
|
||||
{
|
||||
if( !IsTraceEnabled( aWhat ) )
|
||||
return;
|
||||
|
||||
wxString str;
|
||||
str.PrintfV( aFmt, vargs );
|
||||
|
||||
@@ -311,6 +321,7 @@ void TRACE_MANAGER::traceV( const wxString& aWhat, const wxString& aFmt, va_list
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void TRACE_MANAGER::init()
|
||||
{
|
||||
wxString traceVars;
|
||||
|
||||
Reference in New Issue
Block a user