mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Accurate pv: remove redundant check
We don't need to check for (i < MAX_PLY), because search is already MAX_PLY limited. No functional change.
This commit is contained in:
parent
7f83a93558
commit
9c409a4efe
2 changed files with 2 additions and 2 deletions
|
@ -900,7 +900,7 @@ moves_loop: // When in check and at SpNode search starts from here
|
|||
{
|
||||
rm.score = value;
|
||||
rm.pv.resize(1);
|
||||
for (int i = 0; (ss+1)->pv && i < MAX_PLY && (ss+1)->pv->pv[i] != MOVE_NONE; ++i)
|
||||
for (int i = 0; (ss+1)->pv && (ss+1)->pv->pv[i] != MOVE_NONE; ++i)
|
||||
rm.pv.push_back((ss+1)->pv->pv[i]);
|
||||
|
||||
// We record how often the best move has been changed in each
|
||||
|
|
|
@ -37,7 +37,7 @@ struct PVEntry {
|
|||
|
||||
void update(Move move, PVEntry* child) {
|
||||
int i = 1;
|
||||
for (pv[0] = move; child && i < MAX_PLY && child->pv[i - 1] != MOVE_NONE; ++i)
|
||||
for (pv[0] = move; child && child->pv[i - 1] != MOVE_NONE; ++i)
|
||||
pv[i] = child->pv[i - 1];
|
||||
pv[i] = MOVE_NONE;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue