From: mstembera Date: Fri, 16 Mar 2018 04:34:38 +0000 (-0700) Subject: Fix an MSVC 2017 error and warnings. X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=350dff446481b9e274e54dc727141f0dbfec0b23 Fix an MSVC 2017 error and warnings. Improved version by @mcostalba. No functional change. --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index fee181ae..bb60107d 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -417,7 +417,8 @@ namespace { // Main king safety evaluation if (kingAttackersCount[Them] > 1 - pos.count(Them)) { - int kingDanger = unsafeChecks = 0; + int kingDanger = 0; + unsafeChecks = 0; // Attacked squares defended at most once by our queen or king weak = attackedBy[Them][ALL_PIECES] diff --git a/src/misc.cpp b/src/misc.cpp index 86c16d36..4e2d4057 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -23,6 +23,11 @@ #undef _WIN32_WINNT #define _WIN32_WINNT 0x0601 // Force to include needed API prototypes #endif + +#ifndef NOMINMAX +#define NOMINMAX +#endif + #include // The needed Windows API for processor groups could be missed from old Windows // versions, so instead of calling them directly (forcing the linker to resolve