From 3a12c332fdf240f52b9e6582d68832e43aa7484e Mon Sep 17 00:00:00 2001 From: CommonLoon102 Date: Sun, 11 Apr 2021 20:18:58 +0200 Subject: [PATCH] revert unnecessary rename of macro --- game.cpp | 2 +- intern.h | 2 +- sound.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/game.cpp b/game.cpp index 9856e4f..9cb510e 100644 --- a/game.cpp +++ b/game.cpp @@ -234,7 +234,7 @@ void Game::transformShadowLayer(int delta) { r = _pwr2_screenTransformLut[_res->_currentScreenResourceNum * 2 + 1]; } if (r != 0) { - assert(r < ARRAYSIZEH(_screenTransformRects)); + assert(r < ARRAYSIZE(_screenTransformRects)); const BoundingBox *b = &_screenTransformRects[r]; const int offset = b->y1 * Video::W + b->x1; src = _video->_frontLayer + offset; diff --git a/intern.h b/intern.h index 7dc1028..d908293 100644 --- a/intern.h +++ b/intern.h @@ -38,7 +38,7 @@ static const bool kByteSwapData = true; static const bool kByteSwapData = (__BYTE_ORDER == __BIG_ENDIAN); #endif -#define ARRAYSIZEH(a) (sizeof(a)/sizeof(a[0])) +#define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0])) #define PACKED __attribute__((packed)) inline uint16_t READ_LE_UINT16(const void *ptr) { diff --git a/sound.cpp b/sound.cpp index 1e0e3e7..2924201 100644 --- a/sound.cpp +++ b/sound.cpp @@ -1066,7 +1066,7 @@ void Game::setSoundObjectPanning(SssObject *so) { if (so->pcm == 0) { return; } - if ((uint32_t)volume >= ARRAYSIZEH(_volumeRampTable)) { + if ((uint32_t)volume >= ARRAYSIZE(_volumeRampTable)) { warning("Out of bounds volume %d (filter %d volume %d)", volume, (so->filter->volumeCurrent >> 16), so->volume); so->panL = 0; so->panR = 0;