aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/PalmOS/Src/launcher/forms
diff options
context:
space:
mode:
authorMax Horn2007-05-01 16:11:19 +0000
committerMax Horn2007-05-01 16:11:19 +0000
commitbb253d806f2f1d5fa1daa4d5f7b1538ca2efb8ae (patch)
tree763a9c5f9c2cf65b300a791dd96b24426c6fe972 /backends/platform/PalmOS/Src/launcher/forms
parentae18ce3e4a8402de69c1f2de30a2b97737b23ee8 (diff)
downloadscummvm-rg350-bb253d806f2f1d5fa1daa4d5f7b1538ca2efb8ae.tar.gz
scummvm-rg350-bb253d806f2f1d5fa1daa4d5f7b1538ca2efb8ae.tar.bz2
scummvm-rg350-bb253d806f2f1d5fa1daa4d5f7b1538ca2efb8ae.zip
Don't manually compute & hardcode the sizes of static arrays -- using ARRAYSIZE, which is less error prone and easier to maintain/extend
svn-id: r26722
Diffstat (limited to 'backends/platform/PalmOS/Src/launcher/forms')
-rwxr-xr-xbackends/platform/PalmOS/Src/launcher/forms/formSelect.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/backends/platform/PalmOS/Src/launcher/forms/formSelect.cpp b/backends/platform/PalmOS/Src/launcher/forms/formSelect.cpp
index 7fd29e6145..179723f18a 100755
--- a/backends/platform/PalmOS/Src/launcher/forms/formSelect.cpp
+++ b/backends/platform/PalmOS/Src/launcher/forms/formSelect.cpp
@@ -27,6 +27,7 @@
#include "formUtil.h"
#include "games.h"
#include "start.h"
+#include "common/util.h"
static Char **items = NULL;
Int16 selectedEngine = -1;
@@ -146,21 +147,21 @@ static const struct {
int size;
const char **listP;
} supported[] = {
- { 10, engine_agos },
- { 1, engine_sky },
- { 2, engine_sword1 },
- { 2, engine_sword2 },
- { 2, engine_cine },
- { 1, engine_queen },
- { 1, engine_lure },
- { 6, engine_gob },
- { 3, engine_kyra },
- { 1, engine_parallaction },
- { 2, engine_saga },
- { 10, engine_scumm },
- { 22, engine_agi },
- { 1, engine_touche },
- { 1, engine_cruise }
+ { ARRAYSIZE(engine_agos), engine_agos },
+ { ARRAYSIZE(engine_sky), engine_sky },
+ { ARRAYSIZE(engine_sword1), engine_sword1 },
+ { ARRAYSIZE(engine_sword2), engine_sword2 },
+ { ARRAYSIZE(engine_cine), engine_cine },
+ { ARRAYSIZE(engine_queen), engine_queen },
+ { ARRAYSIZE(engine_lure), engine_lure },
+ { ARRAYSIZE(engine_gob), engine_gob },
+ { ARRAYSIZE(engine_kyra), engine_kyra },
+ { ARRAYSIZE(engine_parallaction), engine_parallaction },
+ { ARRAYSIZE(engine_saga), engine_saga },
+ { ARRAYSIZE(engine_scumm), engine_scumm },
+ { ARRAYSIZE(engine_agi), engine_agi },
+ { ARRAYSIZE(engine_touche), engine_touche },
+ { ARRAYSIZE(engine_cruise), engine_cruise }
};
static void SelectorSetList(Int16 sel) {