Fixed various minor semantic glitches
There were various minor semantic glitches reported by cppcheck and Andrei Smirnov.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* patman.cpp - a GUS-compatible patch instrument plugin
|
||||
*
|
||||
* Copyright (c) 2007-2008 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
* Copyright (c) 2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2009-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -308,7 +308,7 @@ patmanInstrument::LoadErrors patmanInstrument::loadPatch(
|
||||
short sample;
|
||||
if ( fread( &sample, 2, 1, fd ) != 1 )
|
||||
{
|
||||
delete wave_samples;
|
||||
delete[] wave_samples;
|
||||
fclose( fd );
|
||||
return LoadIO;
|
||||
}
|
||||
@@ -332,7 +332,7 @@ patmanInstrument::LoadErrors patmanInstrument::loadPatch(
|
||||
char sample;
|
||||
if ( fread( &sample, 1, 1, fd ) != 1 )
|
||||
{
|
||||
delete wave_samples;
|
||||
delete[] wave_samples;
|
||||
fclose( fd );
|
||||
return LoadIO;
|
||||
}
|
||||
|
||||
@@ -1040,7 +1040,7 @@ void OscilGen::adaptiveharmonicpostprocess(REALTYPE *f, int size)
|
||||
}
|
||||
}
|
||||
|
||||
delete (inf);
|
||||
delete[] inf;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* MainWindow.cpp - implementation of LMMS' main window
|
||||
*
|
||||
* Copyright (c) 2004-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -481,7 +481,6 @@ void MainWindow::finalize()
|
||||
gridButtons_layout->addWidget( fx_mixer_window, 1, 5 );
|
||||
gridButtons_layout->addWidget( project_notes_window, 1, 6 );
|
||||
gridButtons_layout->addWidget( controllers_window, 1, 7 );
|
||||
gridButtons_layout->addWidget( controllers_window, 1, 7 );
|
||||
gridButtons_layout->setColumnStretch( 100, 1 );
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* EffectRackView.cpp - view for effectChain model
|
||||
*
|
||||
* Copyright (c) 2006-2007 Danny McRae <khjklujn@netscape.net>
|
||||
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -188,7 +188,7 @@ void EffectRackView::update()
|
||||
view_map[i] == false )
|
||||
{
|
||||
delete m_effectViews[i];
|
||||
m_effectViews.erase( it );
|
||||
it = m_effectViews.erase( it );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* rubberband.cpp - rubberband - either own implementation for Qt3 or wrapper
|
||||
* for Qt4
|
||||
*
|
||||
* Copyright (c) 2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -51,7 +51,7 @@ QVector<selectableObject *> rubberBand::selectedObjects() const
|
||||
{
|
||||
if( ( *it )->isSelected() == false )
|
||||
{
|
||||
so.erase( it );
|
||||
it = so.erase( it );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* InstrumentTrack.cpp - implementation of instrument-track-class
|
||||
* (window + data-structures)
|
||||
*
|
||||
* Copyright (c) 2004-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -645,7 +645,7 @@ bool InstrumentTrack::play( const midiTime & _start,
|
||||
// get all notes from the given pattern...
|
||||
const NoteVector & notes = p->notes();
|
||||
// ...and set our index to zero
|
||||
NoteVector::ConstIterator it = notes.begin();
|
||||
NoteVector::ConstIterator nit = notes.begin();
|
||||
#if LMMS_SINGERBOT_SUPPORT
|
||||
int note_idx = 0;
|
||||
#endif
|
||||
@@ -657,21 +657,21 @@ bool InstrumentTrack::play( const midiTime & _start,
|
||||
if( cur_start > 0 )
|
||||
{
|
||||
// skip notes which are posated before start-tact
|
||||
while( it != notes.end() && ( *it )->pos() < cur_start )
|
||||
while( nit != notes.end() && ( *nit )->pos() < cur_start )
|
||||
{
|
||||
#if LMMS_SINGERBOT_SUPPORT
|
||||
if( ( *it )->length() != 0 )
|
||||
if( ( *nit )->length() != 0 )
|
||||
{
|
||||
++note_idx;
|
||||
}
|
||||
#endif
|
||||
++it;
|
||||
++nit;
|
||||
}
|
||||
}
|
||||
|
||||
note * cur_note;
|
||||
while( it != notes.end() &&
|
||||
( cur_note = *it )->pos() == cur_start )
|
||||
while( nit != notes.end() &&
|
||||
( cur_note = *nit )->pos() == cur_start )
|
||||
{
|
||||
if( cur_note->length() != 0 )
|
||||
{
|
||||
@@ -694,7 +694,7 @@ bool InstrumentTrack::play( const midiTime & _start,
|
||||
++note_idx;
|
||||
#endif
|
||||
}
|
||||
++it;
|
||||
++nit;
|
||||
}
|
||||
}
|
||||
return played_a_note;
|
||||
|
||||
Reference in New Issue
Block a user