diff options
author | Max Horn | 2008-05-31 19:35:37 +0000 |
---|---|---|
committer | Max Horn | 2008-05-31 19:35:37 +0000 |
commit | 63cb8227d30ea6a80084b545ec1662c7d99cd1f3 (patch) | |
tree | 05e503c0924db9ed1a7b498b7e4d88c2a126b008 | |
parent | 4ed41d0a16ea626a8412b07af075080744a19797 (diff) | |
download | scummvm-rg350-63cb8227d30ea6a80084b545ec1662c7d99cd1f3.tar.gz scummvm-rg350-63cb8227d30ea6a80084b545ec1662c7d99cd1f3.tar.bz2 scummvm-rg350-63cb8227d30ea6a80084b545ec1662c7d99cd1f3.zip |
Avoid some warnings when compiling in non-DEBUG mode (i.e. with assert() disabled)
svn-id: r32435
-rw-r--r-- | sound/audiostream.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp index 4454a09fe6..588c49ebec 100644 --- a/sound/audiostream.cpp +++ b/sound/audiostream.cpp @@ -134,17 +134,19 @@ public: : _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 @@ void AppendableMemoryStream<stereo, is16Bit, isUnsigned, isLE>::queueBuffer(byte 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); |