Assorted code style fixes
[stockfish] / src / movepick.cpp
index a3143598171d666668b03d5989d5df4693fdb87a..83421272bb033baede512e16db9ebeb078f04f4f 100644 (file)
@@ -142,16 +142,16 @@ void MovePicker::score<QUIETS>() {
 
   const HistoryStats& history = pos.this_thread()->history;
 
-  const CounterMoveStats* cmh = (ss-1)->counterMoves;
-  const CounterMoveStats* fmh = (ss-2)->counterMoves;
-  const CounterMoveStats* fmh2 = (ss-4)->counterMoves;
+  const CounterMoveStats& cmh = *(ss-1)->counterMoves;
+  const CounterMoveStats& fmh = *(ss-2)->counterMoves;
+  const CounterMoveStats& fm2 = *(ss-4)->counterMoves;
 
   Color c = pos.side_to_move();
 
   for (auto& m : *this)
-      m.value =   (*cmh)[pos.moved_piece(m)][to_sq(m)]
-               +  (*fmh)[pos.moved_piece(m)][to_sq(m)]
-               + (*fmh2)[pos.moved_piece(m)][to_sq(m)]
+      m.value =  cmh[pos.moved_piece(m)][to_sq(m)]
+               + fmh[pos.moved_piece(m)][to_sq(m)]
+               + fm2[pos.moved_piece(m)][to_sq(m)]
                + history.get(c, m);
 }