Merge pull request #1585 from DanWin/performance
Performance and other fixes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 ) );
|
||||
}
|
||||
|
||||
@@ -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 ); }
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user