1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00: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:
Marco Costalba 2012-11-02 11:41:49 +01:00
parent c039103b31
commit e3b0327812

View file

@ -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;