]> git.sesse.net Git - stockfish/commitdiff
Fix a warning on Intel C++
authorMarco Costalba <mcostalba@gmail.com>
Sun, 16 Nov 2014 15:25:20 +0000 (16:25 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 17 Nov 2014 11:56:48 +0000 (12:56 +0100)
warning #2259: non-pointer conversion from "int" to
"uint8_t={unsigned char}" may lose significant bits

No functional change.

src/tt.cpp

index 23f6277e473446c619dacdd473ac8cfc6612eda9..117b60027a1678d034b88fe82ed93d7d57194266 100644 (file)
@@ -75,7 +75,7 @@ const TTEntry* TranspositionTable::probe(const Key key) const {
   for (unsigned i = 0; i < TTClusterSize; ++i)
       if (tte[i].key16 == key16)
       {
-          tte[i].genBound8 = generation | (uint8_t)tte[i].bound(); // Refresh
+          tte[i].genBound8 = uint8_t(generation | tte[i].bound()); // Refresh
           return &tte[i];
       }