mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
Allow AccumulatorStack::size to point to one past the end
this is guaranteed to be correct since we access the last element with `size - 1` closes https://github.com/official-stockfish/Stockfish/pull/6368 fixes https://github.com/official-stockfish/Stockfish/issues/6367 no functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
b9e3e7921b
commit
f434cc2918
@@ -75,7 +75,7 @@ void AccumulatorStack::reset() noexcept {
|
||||
}
|
||||
|
||||
void AccumulatorStack::push(const DirtyPiece& dirtyPiece) noexcept {
|
||||
assert(size + 1 < accumulators.size());
|
||||
assert(size < accumulators.size());
|
||||
accumulators[size].reset(dirtyPiece);
|
||||
size++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user