diff --git a/src/TimingData.cpp b/src/TimingData.cpp index a14043772f..41994f3a39 100644 --- a/src/TimingData.cpp +++ b/src/TimingData.cpp @@ -36,8 +36,11 @@ void TimingData::Clear() vector &vSegs = m_avpTimingSegments[tst]; for( unsigned i = 0; i < vSegs.size(); ++i ) { - //LOG->Trace( "deleting %p", vSegs[i] ); - SAFE_DELETE( vSegs[i] ); } +#if defined(DEBUG) + LOG->Trace( "TimingData::Clear(): deleting %p", vSegs[i] ); +#endif + SAFE_DELETE( vSegs[i] ); + } vSegs.clear(); } @@ -312,8 +315,8 @@ TimingSegment* GetSegmentAtRow( int iNoteRow, TimingSegmentType tst ) static void EraseSegment( vector &vSegs, int index, TimingSegment *cur ) { - LOG->Trace( "EraseSegment(%d, %p)", index, cur ); #ifdef DEBUG + LOG->Trace( "EraseSegment(%d, %p)", index, cur ); cur->DebugPrint(); #endif @@ -325,8 +328,8 @@ static void EraseSegment( vector &vSegs, int index, TimingSegmen // so we must deep-copy it (with ::Copy) for new allocations. void TimingData::AddSegment( const TimingSegment *seg ) { - LOG->Trace( "AddSegment( %s )", TimingSegmentTypeToString(seg->GetType()).c_str() ); #ifdef DEBUG + LOG->Trace( "AddSegment( %s )", TimingSegmentTypeToString(seg->GetType()).c_str() ); seg->DebugPrint(); #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 if( bOnSameRow && (*cur) == (*seg) ) { +#if defined(DEBUG) LOG->Trace( "equals previous segment, ignoring" ); +#endif return; }