[Scummvm-cvs-logs] SF.net SVN: scummvm: [32435] scummvm/trunk/sound/audiostream.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat May 31 21:35:37 CEST 2008
Revision: 32435
http://scummvm.svn.sourceforge.net/scummvm/?rev=32435&view=rev
Author: fingolfin
Date: 2008-05-31 12:35:37 -0700 (Sat, 31 May 2008)
Log Message:
-----------
Avoid some warnings when compiling in non-DEBUG mode (i.e. with assert() disabled)
Modified Paths:
--------------
scummvm/trunk/sound/audiostream.cpp
Modified: scummvm/trunk/sound/audiostream.cpp
===================================================================
--- scummvm/trunk/sound/audiostream.cpp 2008-05-31 19:29:12 UTC (rev 32434)
+++ scummvm/trunk/sound/audiostream.cpp 2008-05-31 19:35:37 UTC (rev 32435)
@@ -134,17 +134,19 @@
: _ptr(ptr), _end(ptr+len), _loopPtr(0), _loopEnd(0), _rate(rate), _playtime(calculatePlayTime(rate, len / (is16Bit ? 2 : 1) / (stereo ? 2 : 1))) {
// Verify the buffer sizes are sane
- if (is16Bit && stereo)
+ if (is16Bit && stereo) {
assert((len & 3) == 0 && (loopLen & 3) == 0);
- else if (is16Bit || stereo)
+ } else if (is16Bit || stereo) {
assert((len & 1) == 0 && (loopLen & 1) == 0);
+ }
if (loopLen) {
_loopPtr = _ptr + loopOffset;
_loopEnd = _loopPtr + loopLen;
}
- if (stereo) // Stereo requires even sized data
+ if (stereo) { // Stereo requires even sized data
assert(len % 2 == 0);
+ }
_origPtr = autoFreeMemory ? ptr : 0;
}
@@ -329,10 +331,11 @@
Common::StackLock lock(_mutex);
// Verify the buffer size is sane
- if (is16Bit && stereo)
+ if (is16Bit && stereo) {
assert((size & 3) == 0);
- else if (is16Bit || stereo)
+ } else if (is16Bit || stereo) {
assert((size & 1) == 0);
+ }
// Verify that the stream has not yet been finalized (by a call to finish())
assert(!_finalized);
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