[Scummvm-cvs-logs] SF.net SVN: scummvm: [30760] scummvm/trunk/sound/adpcm.cpp

Anotherguest at users.sourceforge.net Anotherguest at users.sourceforge.net
Sun Feb 3 13:34:21 CET 2008


Revision: 30760
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30760&view=rev
Author:   Anotherguest
Date:     2008-02-03 04:34:20 -0800 (Sun, 03 Feb 2008)

Log Message:
-----------
Added template param to CLIP since implicit cast is not working 100% on all platforms. Target type is int32 so used that.

Modified Paths:
--------------
    scummvm/trunk/sound/adpcm.cpp

Modified: scummvm/trunk/sound/adpcm.cpp
===================================================================
--- scummvm/trunk/sound/adpcm.cpp	2008-02-03 12:32:19 UTC (rev 30759)
+++ scummvm/trunk/sound/adpcm.cpp	2008-02-03 12:34:20 UTC (rev 30760)
@@ -297,7 +297,7 @@
 
 	_status.last = samp;
 	_status.stepIndex += stepAdjust(code);
-	_status.stepIndex = CLIP(_status.stepIndex, 0, ARRAYSIZE(okiStepSize) - 1);
+	_status.stepIndex = CLIP<int32>(_status.stepIndex, 0, ARRAYSIZE(okiStepSize) - 1);
 
 	// * 16 effectively converts 12-bit input to 16-bit output
 	return samp * 16;
@@ -326,7 +326,7 @@
 
 	_status.last = samp;
 	_status.stepIndex += stepAdjust(code);
-	_status.stepIndex = CLIP(_status.stepIndex, 0, ARRAYSIZE(imaStepTable) - 1);
+	_status.stepIndex = CLIP<int32>(_status.stepIndex, 0, ARRAYSIZE(imaStepTable) - 1);
 
 	return samp;
 }


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