[Scummvm-cvs-logs] SF.net SVN: scummvm:[50147] scummvm/trunk/engines/sci/sound

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Tue Jun 22 17:45:59 CEST 2010


Revision: 50147
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50147&view=rev
Author:   m_kiewitz
Date:     2010-06-22 15:45:59 +0000 (Tue, 22 Jun 2010)

Log Message:
-----------
SCI: removing unneeded capacity uint from r50143

Modified Paths:
--------------
    scummvm/trunk/engines/sci/sound/music.cpp
    scummvm/trunk/engines/sci/sound/music.h

Modified: scummvm/trunk/engines/sci/sound/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/music.cpp	2010-06-22 15:33:46 UTC (rev 50146)
+++ scummvm/trunk/engines/sci/sound/music.cpp	2010-06-22 15:45:59 UTC (rev 50147)
@@ -47,8 +47,7 @@
 	for (int i = 0; i < 16; i++)
 		_usedChannel[i] = 0;
 
-	_queuedCommandCapacity = 1000;
-	_queuedCommands.reserve(_queuedCommandCapacity);
+	_queuedCommands.reserve(1000);
 }
 
 SciMusic::~SciMusic() {
@@ -126,11 +125,6 @@
 }
 
 void SciMusic::putMidiCommandInQueue(uint32 midi) {
-	if (_queuedCommands.size() == _queuedCommandCapacity) {
-		// We need more space
-		_queuedCommandCapacity *= 2;
-		_queuedCommands.reserve(_queuedCommandCapacity);
-	}
 	_queuedCommands.push_back(midi);
 }
 

Modified: scummvm/trunk/engines/sci/sound/music.h
===================================================================
--- scummvm/trunk/engines/sci/sound/music.h	2010-06-22 15:33:46 UTC (rev 50146)
+++ scummvm/trunk/engines/sci/sound/music.h	2010-06-22 15:45:59 UTC (rev 50147)
@@ -225,7 +225,6 @@
 	byte _masterVolume;
 	MusicEntry *_usedChannel[16];
 
-	uint _queuedCommandCapacity;
 	MidiCommandQueue _queuedCommands;
 
 	int _driverFirstChannel;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list