]> git.sesse.net Git - stockfish/commitdiff
Document why Book is defined static
authorMarco Costalba <mcostalba@gmail.com>
Sat, 1 Oct 2011 05:35:24 +0000 (06:35 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 2 Oct 2011 05:54:57 +0000 (06:54 +0100)
This was not clear to someone on talkchess and actually
is not trivial to understand.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp

index ed18936f760eb71cb7450daa8c12279f7d3f1ef0..1f848183481a573cf59710f2993a1c4fb890a1f2 100644 (file)
@@ -363,7 +363,7 @@ int64_t perft(Position& pos, Depth depth) {
 
 bool think(Position& pos, const SearchLimits& limits, Move searchMoves[]) {
 
-  static Book book;
+  static Book book; // Define static to initialize the PRNG only once
 
   // Initialize global search-related variables
   StopOnPonderhit = StopRequest = QuitRequest = AspirationFailLow = false;