[Scummvm-cvs-logs] SF.net SVN: scummvm: [26307] scummvm/trunk/engines/kyra/sound_towns.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Mar 27 16:12:17 CEST 2007


Revision: 26307
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26307&view=rev
Author:   fingolfin
Date:     2007-03-27 07:12:16 -0700 (Tue, 27 Mar 2007)

Log Message:
-----------
fixed const correctness

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/sound_towns.cpp

Modified: scummvm/trunk/engines/kyra/sound_towns.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_towns.cpp	2007-03-26 19:31:36 UTC (rev 26306)
+++ scummvm/trunk/engines/kyra/sound_towns.cpp	2007-03-27 14:12:16 UTC (rev 26307)
@@ -119,7 +119,7 @@
 			int32 samplingRate;
 			int32 keyOffset;
 			int32 keyNote;
-			int8 *_samples;
+			const int8 *_samples;
 		} * _snd[8];
 		struct Env {
 			EuD_ChannelState state;
@@ -342,7 +342,7 @@
 void MidiChannel_EuD_WAVE::sysEx_customInstrument(uint32 type, const byte *fmInst) {
 	if (type == 0x80) {
 		for (uint8 i = 0; i < 8; i++) {
-			byte ** pos = (byte **) fmInst;
+			const byte * const* pos = (const byte * const*) fmInst;
 			for (uint8 ii = 0; ii < 10; ii++) {
 				if (_voice->id[i] == *(pos[ii] + 8)) {
 					if (!_voice->_snd[i])
@@ -355,8 +355,8 @@
 					_voice->_snd[i]->loopLength = READ_LE_UINT32(pos[ii] + 20);
 					_voice->_snd[i]->samplingRate = READ_LE_UINT16(pos[ii] + 24);
 					_voice->_snd[i]->keyOffset = READ_LE_UINT16(pos[ii] + 26);
-					_voice->_snd[i]->keyNote = *(uint8*)(pos[ii] + 28);
-					_voice->_snd[i]->_samples = (int8*)(pos[ii] + 32);
+					_voice->_snd[i]->keyNote = *(const uint8*)(pos[ii] + 28);
+					_voice->_snd[i]->_samples = (const int8*)(pos[ii] + 32);
 				}
 			}
 		}
@@ -397,7 +397,7 @@
 
 	int32 looplength = _voice->_snd[_current]->loopLength;
 	int32 numsamples = _voice->_snd[_current]->numSamples;
-	int8 * samples = _voice->_snd[_current]->_samples;
+	const int8 * samples = _voice->_snd[_current]->_samples;
 
 	for (int i = 0; i < buflen; i++) {
 		if (looplength > 0) {


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