mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-17 23:56:23 +08:00
Safe guard some wild and ugly casts
These casts are needed but plain ugly, at least be sure they don't hide any subtle conversion bug. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -89,6 +89,7 @@ void generate_kpk_bitbase(uint8_t bitbase[]) {
|
||||
int i, j, b;
|
||||
for(i = 0; i < 24576; i++) {
|
||||
for(b = 0, j = 0; j < 8; b |= (compress_result(Bitbase[8*i+j]) << j), j++);
|
||||
assert(b == int(uint8_t(b)));
|
||||
bitbase[i] = (uint8_t)b;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user