]> git.sesse.net Git - stockfish/blobdiff - src/nnue/nnue_feature_transformer.h
Small cleanups 13
[stockfish] / src / nnue / nnue_feature_transformer.h
index f49777b50bbe3f6809acd358399ae9b5dbf1bda1..85bc2bc8e66cb5014cfb779e7f25e3482d1aa8a9 100644 (file)
@@ -247,7 +247,7 @@ namespace Eval::NNUE {
       // Look for a usable accumulator of an earlier position. We keep track
       // of the estimated gain in terms of features to be added/subtracted.
       StateInfo *st = pos.state(), *next = nullptr;
-      int gain = popcount(pos.pieces()) - 2;
+      int gain = pos.count<ALL_PIECES>() - 2;
       while (st->accumulator.state[c] == EMPTY)
       {
         auto& dp = st->dirtyPiece;