Remove unnecessary deque allocation in perft

closes https://github.com/official-stockfish/Stockfish/pull/6182

No functional change.
This commit is contained in:
87
2025-07-28 20:05:26 +02:00
committed by Joost VandeVondele
parent a9b7638e96
commit 1d8f118c3e
+3 -3
View File
@@ -56,9 +56,9 @@ uint64_t perft(Position& pos, Depth depth) {
}
inline uint64_t perft(const std::string& fen, Depth depth, bool isChess960) {
StateListPtr states(new std::deque<StateInfo>(1));
Position p;
p.set(fen, isChess960, &states->back());
StateInfo st;
Position p;
p.set(fen, isChess960, &st);
return perft<true>(p, depth);
}