From 9893afc59a1759a729390b128f55576a904fd28e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 16 Aug 2016 08:51:31 +0200 Subject: [PATCH] Get rid of macro --- desmume/src/common.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/desmume/src/common.cpp b/desmume/src/common.cpp index 11a879bd8..a47728d27 100644 --- a/desmume/src/common.cpp +++ b/desmume/src/common.cpp @@ -376,16 +376,13 @@ static MAKER makerCodes[] = { { 0x4849, "Yojigen" }, }; -#define makerNum sizeof(makerCodes) / sizeof(makerCodes[0]) - std::string getDeveloperNameByID(u16 id) { - for (u32 i = 0; i < makerNum; i++) + u32 i; + for (i = 0; i < ARRAY_SIZE(makerCodes); i++) { if (makerCodes[i].code == id) - { return makerCodes[i].name; - } } return "Unknown"; }