Performance and other fixes

This commit is contained in:
Daniel Winzen
2015-01-09 20:17:07 +01:00
parent baa57fb662
commit 4a55e1c46a
14 changed files with 26 additions and 23 deletions

View File

@@ -195,7 +195,7 @@ MidiTime AutomationPattern::putValue( const MidiTime & _time,
timeMap::const_iterator it = m_timeMap.find( newTime );
if( it != m_timeMap.begin() )
{
it--;
--it;
}
generateTangents(it, 3);
@@ -229,7 +229,7 @@ void AutomationPattern::removeValue( const MidiTime & _time,
timeMap::const_iterator it = m_timeMap.lowerBound( newTime );
if( it != m_timeMap.begin() )
{
it--;
--it;
}
generateTangents(it, 3);
@@ -271,7 +271,7 @@ MidiTime AutomationPattern::setDragValue( const MidiTime & _time, const float _v
//Restore to the state before it the point were being dragged
m_timeMap = m_oldTimeMap;
for( timeMap::const_iterator it = m_timeMap.begin(); it != m_timeMap.end(); it++ )
for( timeMap::const_iterator it = m_timeMap.begin(); it != m_timeMap.end(); ++it )
{
generateTangents(it, 3);
}

View File

@@ -32,7 +32,7 @@ Ladspa2LMMS::Ladspa2LMMS()
l_sortable_plugin_t plugins = getSortedPlugins();
for( l_sortable_plugin_t::iterator it = plugins.begin();
it != plugins.end(); it++ )
it != plugins.end(); ++it )
{
ladspa_key_t key = (*it).second;
ladspaManagerDescription * desc = getDescription( key );

View File

@@ -96,7 +96,7 @@ LadspaManager::LadspaManager()
l_ladspa_key_t keys = m_ladspaManagerMap.keys();
for( l_ladspa_key_t::iterator it = keys.begin();
it != keys.end(); it++ )
it != keys.end(); ++it )
{
m_sortedPlugins.append( qMakePair( getName( *it ), *it ) );
}

View File

@@ -1774,7 +1774,7 @@ void TrackOperationsWidget::recordingOn()
if( atv )
{
const Track::tcoVector & tcov = atv->getTrack()->getTCOs();
for( Track::tcoVector::const_iterator it = tcov.begin(); it != tcov.end(); it++ )
for( Track::tcoVector::const_iterator it = tcov.begin(); it != tcov.end(); ++it )
{
AutomationPattern * ap = dynamic_cast<AutomationPattern *>( *it );
if( ap ) { ap->setRecording( true ); }
@@ -1790,7 +1790,7 @@ void TrackOperationsWidget::recordingOff()
if( atv )
{
const Track::tcoVector & tcov = atv->getTrack()->getTCOs();
for( Track::tcoVector::const_iterator it = tcov.begin(); it != tcov.end(); it++ )
for( Track::tcoVector::const_iterator it = tcov.begin(); it != tcov.end(); ++it )
{
AutomationPattern * ap = dynamic_cast<AutomationPattern *>( *it );
if( ap ) { ap->setRecording( false ); }

View File

@@ -120,6 +120,7 @@ bool AudioFileOgg::startEncoding()
printf( "Mode initialization failed: invalid parameters for "
"bitrate\n" );
vorbis_info_clear( &m_vi );
delete[] user_comments;
return false;
}

View File

@@ -1211,7 +1211,7 @@ void MainWindow::collectErrors(const QList<QString>* errors )
void MainWindow::collectError( const QString error )
void MainWindow::collectError( const QString & error )
{
m_errors->append( error );
}
@@ -1225,7 +1225,7 @@ void MainWindow::clearErrors()
void MainWindow::showErrors( const QString message )
void MainWindow::showErrors( const QString & message )
{
if ( m_errors->length() != 0 )
{ QString* errors = new QString();

View File

@@ -99,8 +99,8 @@ PluginDescList::PluginDescList(QWidget *parent) :
std::sort(m_pluginDescriptors.begin(), m_pluginDescriptors.end(), pluginBefore);
for(Plugin::DescriptorList::const_iterator it = m_pluginDescriptors.constBegin();
it != m_pluginDescriptors.constEnd(); it++)
for( Plugin::DescriptorList::const_iterator it = m_pluginDescriptors.constBegin();
it != m_pluginDescriptors.constEnd(); ++it )
{
if( it->type == Plugin::Instrument )
{