[libgens] macros/common.h: ARRAY_SIZE(): Use (int) casts, not (size_t) casts.
authorDavid Korth <gerbilsoft@gerbilsoft.com>
Sun, 3 Apr 2016 02:13:34 +0000 (22:13 -0400)
committerDavid Korth <gerbilsoft@gerbilsoft.com>
Sun, 3 Apr 2016 02:13:34 +0000 (22:13 -0400)
Fixes an issue where size_t isn't available in SysVersion.cpp, which will
be added in the next commit.

Also, it should be (int) anyway, since the first part was already (int).

src/libgens/macros/common.h

index 244b550..3b3f4f0 100644 (file)
  */
 #define ARRAY_SIZE(x) \
        ((int)(((sizeof(x) / sizeof(x[0]))) / \
-              (size_t)(!(sizeof(x) % sizeof(x[0])))))
+              (int)(!(sizeof(x) % sizeof(x[0])))))
 
 #endif /* __LIBGENS_MACROS_COMMON_H__ */