aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorChristoph Mallon2011-08-07 10:19:30 +0200
committerChristoph Mallon2011-08-07 15:19:08 +0200
commitab80b20a305728ecbe402ab0461c9a10cd7570b5 (patch)
treecac50fcfdc20337789b88f1a62da468ca809e6a8 /audio
parente3e0a317e703fe355275a197043ec8e05005ec7b (diff)
downloadscummvm-rg350-ab80b20a305728ecbe402ab0461c9a10cd7570b5.tar.gz
scummvm-rg350-ab80b20a305728ecbe402ab0461c9a10cd7570b5.tar.bz2
scummvm-rg350-ab80b20a305728ecbe402ab0461c9a10cd7570b5.zip
COMMON: Replace x + ARRAYSIZE(x) by the simpler ARRAYEND(x).
Diffstat (limited to 'audio')
-rw-r--r--audio/decoders/vorbis.cpp2
-rw-r--r--audio/mods/maxtrax.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/audio/decoders/vorbis.cpp b/audio/decoders/vorbis.cpp
index 455803dc05..64cacb4d58 100644
--- a/audio/decoders/vorbis.cpp
+++ b/audio/decoders/vorbis.cpp
@@ -123,7 +123,7 @@ protected:
VorbisStream::VorbisStream(Common::SeekableReadStream *inStream, DisposeAfterUse::Flag dispose) :
_inStream(inStream, dispose),
_length(0, 1000),
- _bufferEnd(_buffer + ARRAYSIZE(_buffer)) {
+ _bufferEnd(ARRAYEND(_buffer)) {
int res = ov_open_callbacks(inStream, &_ovFile, NULL, 0, g_stream_wrap);
if (res < 0) {
diff --git a/audio/mods/maxtrax.cpp b/audio/mods/maxtrax.cpp
index 953bb8f8d2..252c0e3b06 100644
--- a/audio/mods/maxtrax.cpp
+++ b/audio/mods/maxtrax.cpp
@@ -707,7 +707,7 @@ int8 MaxTrax::noteOn(ChannelContext &channel, const byte note, uint16 volume, ui
if ((channel.flags & ChannelContext::kFlagMono) == 0) {
voiceNum = pickvoice((channel.flags & ChannelContext::kFlagRightChannel) != 0 ? 1 : 0, pri);
} else {
- VoiceContext *voice = _voiceCtx + ARRAYSIZE(_voiceCtx) - 1;
+ VoiceContext *voice = ARRAYEND(_voiceCtx) - 1;
for (voiceNum = ARRAYSIZE(_voiceCtx) - 1; voiceNum >= 0 && voice->channel != &channel; --voiceNum, --voice)
;
if (voiceNum < 0)