diff options
author | SupSuper | 2018-12-16 21:56:19 +0000 |
---|---|---|
committer | Filippos Karapetis | 2018-12-17 12:28:33 +0200 |
commit | d0512db25ce5bbd8f31151c3d2374f344f77f006 (patch) | |
tree | 33563123f9a15b0cb0a0c0d09b6c8599c5761422 /common | |
parent | 0a60e6ac8d36fbccf407e0a337ad12bc3d13faf3 (diff) | |
download | scummvm-rg350-d0512db25ce5bbd8f31151c3d2374f344f77f006.tar.gz scummvm-rg350-d0512db25ce5bbd8f31151c3d2374f344f77f006.tar.bz2 scummvm-rg350-d0512db25ce5bbd8f31151c3d2374f344f77f006.zip |
WIN32: Move all ARRAYSIZE undefs to util.h
Instead of trying to undefine ARRAYSIZE everywhere we use a Windows header, let's just do it before we define our own
Diffstat (limited to 'common')
-rw-r--r-- | common/scummsys.h | 5 | ||||
-rw-r--r-- | common/translation.cpp | 2 | ||||
-rw-r--r-- | common/util.h | 4 |
3 files changed, 4 insertions, 7 deletions
diff --git a/common/scummsys.h b/common/scummsys.h index 3b22272b5a..b205665653 100644 --- a/common/scummsys.h +++ b/common/scummsys.h @@ -117,11 +117,6 @@ #endif - #if defined(ARRAYSIZE) - // VS2005beta2 introduces new stuff in winnt.h - #undef ARRAYSIZE - #endif - #endif #if defined(__QNXNTO__) diff --git a/common/translation.cpp b/common/translation.cpp index 35e5b6e4c3..1debabfb7d 100644 --- a/common/translation.cpp +++ b/common/translation.cpp @@ -23,8 +23,6 @@ #if defined(WIN32) #define WIN32_LEAN_AND_MEAN #include <windows.h> -// winnt.h defines ARRAYSIZE, but we want our own one... - this is needed before including util.h -#undef ARRAYSIZE #endif #define TRANSLATIONS_DAT_VER 3 diff --git a/common/util.h b/common/util.h index 2d6a36d086..77d7523034 100644 --- a/common/util.h +++ b/common/util.h @@ -56,6 +56,10 @@ template<typename T> inline T CLIP(T v, T amin, T amax) */ template<typename T> inline void SWAP(T &a, T &b) { T tmp = a; a = b; b = tmp; } +#ifdef ARRAYSIZE +#undef ARRAYSIZE +#endif + /** * Macro which determines the number of entries in a fixed size array. */ |