mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 00:26:33 +08:00
Fix a warning under MSVC
Compiler complies that 'cnt' is initialized but unused (in !CheckThreeFold case). Moving the definition of 'cnt'out of the loop seems to do the trick. No functional change.
This commit is contained in:
@@ -1448,13 +1448,13 @@ bool Position::is_draw() const {
|
||||
|
||||
if (CheckRepetition)
|
||||
{
|
||||
int i = 4, e = std::min(st->rule50, st->pliesFromNull);
|
||||
int i = 4, e = std::min(st->rule50, st->pliesFromNull), cnt;
|
||||
|
||||
if (i <= e)
|
||||
{
|
||||
StateInfo* stp = st->previous->previous;
|
||||
|
||||
for (int cnt = 0; i <= e; i += 2)
|
||||
for (cnt = 0; i <= e; i += 2)
|
||||
{
|
||||
stp = stp->previous->previous;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user