Skip to content

Commit

Permalink
Fix an MSVC 2017 error and warnings.
Browse files Browse the repository at this point in the history
Improved version by @mcostalba.

No functional change.
  • Loading branch information
mstembera authored and snicolet committed Mar 16, 2018
1 parent 96362fe commit 350dff4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/evaluate.cpp
Expand Up @@ -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]
Expand Down
5 changes: 5 additions & 0 deletions src/misc.cpp
Expand Up @@ -23,6 +23,11 @@
#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
Expand Down

0 comments on commit 350dff4

Please sign in to comment.