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:
parent
c039103b31
commit
e3b0327812
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue