]> git.sesse.net Git - stockfish/blobdiff - src/movepick.cpp
Better interface to get the current move type
[stockfish] / src / movepick.cpp
index fa911dfb350b348e2399a964d6262b9dcf7b443d..a18c46923b60742160816fddb3d9c8ff2734dc35 100644 (file)
@@ -38,7 +38,6 @@ namespace {
 
   /// Variables
 
-  MovePicker::MovegenPhase PhaseTable[32];
   int MainSearchPhaseIndex;
   int EvasionsPhaseIndex;
   int QsearchWithChecksPhaseIndex;
@@ -46,6 +45,9 @@ namespace {
 
 }
 
+// Static array definition
+MovePicker::MovegenPhase MovePicker::PhaseTable[32];
+
 
 ////
 //// Functions
@@ -92,7 +94,7 @@ MovePicker::MovePicker(Position &p, bool pvnode, Move ttm, Move mk,
 /// class.  It returns a new legal move every time it is called, until there
 /// are no more moves left of the types we are interested in.
 
-Move MovePicker::get_next_move(MovegenPhase* moveType) {
+Move MovePicker::get_next_move() {
   Move move;
 
   while(true) {
@@ -106,9 +108,6 @@ Move MovePicker::get_next_move(MovegenPhase* moveType) {
 
     // Next phase:
     phaseIndex++;
-    if (moveType)
-        *moveType = PhaseTable[phaseIndex];
-
     switch(PhaseTable[phaseIndex]) {
 
     case PH_TT_MOVE: