From: sapier Date: Sun, 20 Apr 2014 00:47:02 +0000 (+0200) Subject: Fix macro ARRAYSIZE name collision on windows X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=fec1fa51e06185c81a4a69a0a88c1a6ccc68bce7;p=zefram%2Fminetest%2Fminetest_engine.git Fix macro ARRAYSIZE name collision on windows --- diff --git a/src/clientiface.h b/src/clientiface.h index 752e2bb8..89e0f41b 100644 --- a/src/clientiface.h +++ b/src/clientiface.h @@ -141,7 +141,7 @@ namespace con { class Connection; } -#define ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0])) +#define CI_ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0])) enum ClientState { @@ -433,7 +433,7 @@ public: { assert(m_env == 0); m_env = env; } static std::string state2Name(ClientState state) { - assert((int) state < ARRAYSIZE(statenames)); + assert((int) state < CI_ARRAYSIZE(statenames)); return statenames[state]; }