diff --git a/plugins/patman/patman.cpp b/plugins/patman/patman.cpp index e0a990347..7459c92b7 100644 --- a/plugins/patman/patman.cpp +++ b/plugins/patman/patman.cpp @@ -2,6 +2,7 @@ * patman.cpp - a GUS-compatible patch instrument plugin * * Copyright (c) 2007-2008 Javier Serrano Polo + * Copyright (c) 2009-2011 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -303,7 +304,7 @@ patmanInstrument::LoadErrors patmanInstrument::loadPatch( short sample; if ( fread( &sample, 2, 1, fd ) != 1 ) { - delete wave_samples; + delete[] wave_samples; fclose( fd ); return( LoadIO ); } @@ -327,7 +328,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 f0ebdb6f1..1eb8edd90 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -3,8 +3,8 @@ /* * main_window.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 * * This program is free software; you can redistribute it and/or @@ -477,10 +477,8 @@ void MainWindow::finalize( void ) m_toolBarLayout->addWidget( fx_mixer_window, 1, 5 ); m_toolBarLayout->addWidget( project_notes_window, 1, 6 ); m_toolBarLayout->addWidget( controllers_window, 1, 7 ); - m_toolBarLayout->addWidget( controllers_window, 1, 7 ); m_toolBarLayout->setColumnStretch( 100, 1 ); - // setup-dialog opened before? if( !configManager::inst()->value( "app", "configured" ).toInt() ) { diff --git a/src/gui/widgets/EffectRackView.cpp b/src/gui/widgets/EffectRackView.cpp index f78c3d7e1..ad38e17f9 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 44b3912bf..95c925c16 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 * @@ -632,7 +632,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 @@ -644,21 +644,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 ) { @@ -681,7 +681,7 @@ bool InstrumentTrack::play( const midiTime & _start, ++note_idx; #endif } - ++it; + ++nit; } } return played_a_note;