fix log bloating like whoa (wrap every Trace() in TimingData with DEBUG ifdef)
This commit is contained in:
+9
-4
@@ -36,8 +36,11 @@ void TimingData::Clear()
|
|||||||
vector<TimingSegment*> &vSegs = m_avpTimingSegments[tst];
|
vector<TimingSegment*> &vSegs = m_avpTimingSegments[tst];
|
||||||
for( unsigned i = 0; i < vSegs.size(); ++i )
|
for( unsigned i = 0; i < vSegs.size(); ++i )
|
||||||
{
|
{
|
||||||
//LOG->Trace( "deleting %p", vSegs[i] );
|
#if defined(DEBUG)
|
||||||
SAFE_DELETE( vSegs[i] ); }
|
LOG->Trace( "TimingData::Clear(): deleting %p", vSegs[i] );
|
||||||
|
#endif
|
||||||
|
SAFE_DELETE( vSegs[i] );
|
||||||
|
}
|
||||||
|
|
||||||
vSegs.clear();
|
vSegs.clear();
|
||||||
}
|
}
|
||||||
@@ -312,8 +315,8 @@ TimingSegment* GetSegmentAtRow( int iNoteRow, TimingSegmentType tst )
|
|||||||
|
|
||||||
static void EraseSegment( vector<TimingSegment*> &vSegs, int index, TimingSegment *cur )
|
static void EraseSegment( vector<TimingSegment*> &vSegs, int index, TimingSegment *cur )
|
||||||
{
|
{
|
||||||
LOG->Trace( "EraseSegment(%d, %p)", index, cur );
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
LOG->Trace( "EraseSegment(%d, %p)", index, cur );
|
||||||
cur->DebugPrint();
|
cur->DebugPrint();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -325,8 +328,8 @@ static void EraseSegment( vector<TimingSegment*> &vSegs, int index, TimingSegmen
|
|||||||
// so we must deep-copy it (with ::Copy) for new allocations.
|
// so we must deep-copy it (with ::Copy) for new allocations.
|
||||||
void TimingData::AddSegment( const TimingSegment *seg )
|
void TimingData::AddSegment( const TimingSegment *seg )
|
||||||
{
|
{
|
||||||
LOG->Trace( "AddSegment( %s )", TimingSegmentTypeToString(seg->GetType()).c_str() );
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
LOG->Trace( "AddSegment( %s )", TimingSegmentTypeToString(seg->GetType()).c_str() );
|
||||||
seg->DebugPrint();
|
seg->DebugPrint();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -390,7 +393,9 @@ void TimingData::AddSegment( const TimingSegment *seg )
|
|||||||
// the segment at or before this row is equal to the new one; ignore it
|
// the segment at or before this row is equal to the new one; ignore it
|
||||||
if( bOnSameRow && (*cur) == (*seg) )
|
if( bOnSameRow && (*cur) == (*seg) )
|
||||||
{
|
{
|
||||||
|
#if defined(DEBUG)
|
||||||
LOG->Trace( "equals previous segment, ignoring" );
|
LOG->Trace( "equals previous segment, ignoring" );
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user