]> git.sesse.net Git - stockfish/blobdiff - src/bitboard.h
Make casting styles consistent
[stockfish] / src / bitboard.h
index 244dc034c33d680611e861b469124a8b2e96d3cf..dee73b4b3f70285016e601032cd4ed65738f65a8 100644 (file)
 #ifndef BITBOARD_H_INCLUDED
 #define BITBOARD_H_INCLUDED
 
+#include <algorithm>
+#include <cassert>
+#include <cmath>
+#include <cstdint>
+#include <cstdlib>
 #include <string>
 
 #include "types.h"
@@ -257,9 +262,9 @@ inline int popcount(Bitboard b) {
   union { Bitboard bb; uint16_t u[4]; } v = { b };
   return PopCnt16[v.u[0]] + PopCnt16[v.u[1]] + PopCnt16[v.u[2]] + PopCnt16[v.u[3]];
 
-#elif defined(_MSC_VER) || defined(__INTEL_COMPILER)
+#elif defined(_MSC_VER)
 
-  return (int)_mm_popcnt_u64(b);
+  return int(_mm_popcnt_u64(b));
 
 #else // Assumed gcc or compatible compiler
 
@@ -271,7 +276,7 @@ inline int popcount(Bitboard b) {
 
 /// lsb() and msb() return the least/most significant bit in a non-zero bitboard
 
-#if defined(__GNUC__)  // GCC, Clang, ICC
+#if defined(__GNUC__)  // GCC, Clang, ICX
 
 inline Square lsb(Bitboard b) {
   assert(b);