]> git.sesse.net Git - stockfish/commitdiff
Fix an MSVC 2017 error and warnings.
authormstembera <MissingEmail@email>
Fri, 16 Mar 2018 04:34:38 +0000 (21:34 -0700)
committerStéphane Nicolet <cassio@free.fr>
Fri, 16 Mar 2018 21:37:03 +0000 (22:37 +0100)
Improved version by @mcostalba.

No functional change.

src/evaluate.cpp
src/misc.cpp

index fee181aeb2c61d9f564ca2d81ecad77ccefc9cf9..bb60107dc42ea069aa754c617bdfa11691535879 100644 (file)
@@ -417,7 +417,8 @@ namespace {
     // Main king safety evaluation
     if (kingAttackersCount[Them] > 1 - pos.count<QUEEN>(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]
index 86c16d36174d3e0bac9616efa54bcb532312219e..4e2d40579153cd757376399ec742213371277c72 100644 (file)
 #undef  _WIN32_WINNT
 #define _WIN32_WINNT 0x0601 // Force to include needed API prototypes
 #endif
+
+#ifndef NOMINMAX
+#define NOMINMAX
+#endif
+
 #include <windows.h>
 // 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