diff --git a/plugins/patman/patman.cpp b/plugins/patman/patman.cpp index 0bb8a887b..2cdec4d91 100644 --- a/plugins/patman/patman.cpp +++ b/plugins/patman/patman.cpp @@ -2,7 +2,7 @@ * patman.cpp - a GUS-compatible patch instrument plugin * * Copyright (c) 2007-2008 Javier Serrano Polo - * Copyright (c) 2009 Tobias Doerffel + * Copyright (c) 2009-2011 Tobias Doerffel * * 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; } diff --git a/plugins/zynaddsubfx/src/Synth/OscilGen.cpp b/plugins/zynaddsubfx/src/Synth/OscilGen.cpp index 97eb74659..9eb609850 100644 --- a/plugins/zynaddsubfx/src/Synth/OscilGen.cpp +++ b/plugins/zynaddsubfx/src/Synth/OscilGen.cpp @@ -1040,7 +1040,7 @@ void OscilGen::adaptiveharmonicpostprocess(REALTYPE *f, int size) } } - delete (inf); + delete[] inf; } diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 2f438b478..290367243 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -1,7 +1,7 @@ /* * MainWindow.cpp - implementation of LMMS' main window * - * Copyright (c) 2004-2010 Tobias Doerffel + * Copyright (c) 2004-2011 Tobias Doerffel * * 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 ); diff --git a/src/gui/widgets/EffectRackView.cpp b/src/gui/widgets/EffectRackView.cpp index bd59656b6..4d39685d7 100644 --- a/src/gui/widgets/EffectRackView.cpp +++ b/src/gui/widgets/EffectRackView.cpp @@ -2,7 +2,7 @@ * EffectRackView.cpp - view for effectChain model * * Copyright (c) 2006-2007 Danny McRae - * Copyright (c) 2008-2009 Tobias Doerffel + * Copyright (c) 2008-2011 Tobias Doerffel * * 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 { diff --git a/src/gui/widgets/rubberband.cpp b/src/gui/widgets/rubberband.cpp index 1c139628d..007a6b67f 100644 --- a/src/gui/widgets/rubberband.cpp +++ b/src/gui/widgets/rubberband.cpp @@ -2,7 +2,7 @@ * rubberband.cpp - rubberband - either own implementation for Qt3 or wrapper * for Qt4 * - * Copyright (c) 2006 Tobias Doerffel + * Copyright (c) 2006-2011 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -51,7 +51,7 @@ QVector rubberBand::selectedObjects() const { if( ( *it )->isSelected() == false ) { - so.erase( it ); + it = so.erase( it ); } else { diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 7f3571446..b31ea3e9d 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -2,7 +2,7 @@ * InstrumentTrack.cpp - implementation of instrument-track-class * (window + data-structures) * - * Copyright (c) 2004-2010 Tobias Doerffel + * Copyright (c) 2004-2011 Tobias Doerffel * * 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;