]> git.sesse.net Git - stockfish/blobdiff - src/movepick.cpp
Workaround a static data member bug in MSVC
[stockfish] / src / movepick.cpp
index fa911dfb350b348e2399a964d6262b9dcf7b443d..4d2d31167ea2db2641c582c545ba3c6c46b1a0fe 100644 (file)
@@ -38,7 +38,7 @@ namespace {
 
   /// Variables
 
-  MovePicker::MovegenPhase PhaseTable[32];
+  MovePicker::MovegenPhase PhaseTable[32];  
   int MainSearchPhaseIndex;
   int EvasionsPhaseIndex;
   int QsearchWithChecksPhaseIndex;
@@ -47,6 +47,7 @@ namespace {
 }
 
 
+
 ////
 //// Functions
 ////
@@ -92,7 +93,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 +107,6 @@ Move MovePicker::get_next_move(MovegenPhase* moveType) {
 
     // Next phase:
     phaseIndex++;
-    if (moveType)
-        *moveType = PhaseTable[phaseIndex];
-
     switch(PhaseTable[phaseIndex]) {
 
     case PH_TT_MOVE:
@@ -441,6 +439,9 @@ Move MovePicker::pick_move_from_list() {
   return MOVE_NONE;
 }
 
+MovePicker::MovegenPhase MovePicker::current_move_type() const {
+  return PhaseTable[phaseIndex];
+}
 
 /// MovePicker::init_phase_table() initializes the PhaseTable[],
 /// MainSearchPhaseIndex, EvasionPhaseIndex, QsearchWithChecksPhaseIndex