1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-14 22:07:38 +00:00

Fix a couple of issues in MSVC related to min and max.

MSVC apparently thinks that the result of arithmetic promotions
on an `unsigned:4` bitfield is `unsigned`, not `int`; which then
causes it to fail to deduce whether the `T` in `min<T>` should be
`unsigned` (the type of the LHS) or `int` (the type of the RHS).
Clang and GCC agree that the result of arithmetic promotions on
an `unsigned:4` bitfield should be `int`, so they don't see any
ambiguity here.
This commit is contained in:
Arthur O'Dwyer
2018-07-07 10:24:11 -07:00
parent eac2ce1168
commit f10f5a29b2
2 changed files with 2 additions and 1 deletions

View File

@@ -253,6 +253,7 @@
#if ISWINDOWS
#define hyper fake_hyper // avoid "hyper" typedef in <_mingw.h>
#define WIN32_LEAN_AND_MEAN // avoid "rad1" macro in <windows.h>
#define NOMINMAX // avoid "min" and "max" macros in <windows.h>
#endif
#include <stdio.h>