]> git.sesse.net Git - stockfish/blobdiff - src/position.cpp
Avoid casting to char* in prefetch()
[stockfish] / src / position.cpp
index bb5a86f47f35f9b13778b79c8cbc2f655f8120c8..c02fdf625d26e646a676294fdb926be92d64b722 100644 (file)
@@ -774,7 +774,7 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
       // Update material hash key and prefetch access to materialTable
       k ^= Zobrist::psq[them][captured][capsq];
       st->materialKey ^= Zobrist::psq[them][captured][pieceCount[them][captured]];
       // Update material hash key and prefetch access to materialTable
       k ^= Zobrist::psq[them][captured][capsq];
       st->materialKey ^= Zobrist::psq[them][captured][pieceCount[them][captured]];
-      prefetch((char*)thisThread->materialTable[st->materialKey]);
+      prefetch(thisThread->materialTable[st->materialKey]);
 
       // Update incremental scores
       st->psq -= psq[them][captured][capsq];
 
       // Update incremental scores
       st->psq -= psq[them][captured][capsq];
@@ -841,7 +841,7 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
 
       // Update pawn hash key and prefetch access to pawnsTable
       st->pawnKey ^= Zobrist::psq[us][PAWN][from] ^ Zobrist::psq[us][PAWN][to];
 
       // Update pawn hash key and prefetch access to pawnsTable
       st->pawnKey ^= Zobrist::psq[us][PAWN][from] ^ Zobrist::psq[us][PAWN][to];
-      prefetch((char*)thisThread->pawnsTable[st->pawnKey]);
+      prefetch(thisThread->pawnsTable[st->pawnKey]);
 
       // Reset rule 50 draw counter
       st->rule50 = 0;
 
       // Reset rule 50 draw counter
       st->rule50 = 0;
@@ -988,7 +988,7 @@ void Position::do_null_move(StateInfo& newSt) {
   }
 
   st->key ^= Zobrist::side;
   }
 
   st->key ^= Zobrist::side;
-  prefetch((char*)TT.first_entry(st->key));
+  prefetch(TT.first_entry(st->key));
 
   ++st->rule50;
   st->pliesFromNull = 0;
 
   ++st->rule50;
   st->pliesFromNull = 0;