mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 08:36:33 +08:00
Workaround broken function-style cast support in HP-UX
It seems HP's ANSI C++ doesn't understand very well standard function-style cast. Reported by Richard Lloyd. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -192,7 +192,7 @@ MaterialInfo* MaterialInfoTable::get_material_info(const Position& pos) {
|
||||
|
||||
// Clear the MaterialInfo object, and set its key
|
||||
memset(mi, 0, sizeof(MaterialInfo));
|
||||
mi->factor[WHITE] = mi->factor[BLACK] = uint8_t(SCALE_FACTOR_NORMAL);
|
||||
mi->factor[WHITE] = mi->factor[BLACK] = (uint8_t)SCALE_FACTOR_NORMAL;
|
||||
mi->key = key;
|
||||
|
||||
// Store game phase
|
||||
@@ -353,7 +353,7 @@ MaterialInfo* MaterialInfoTable::get_material_info(const Position& pos) {
|
||||
}
|
||||
matValue += sign * v;
|
||||
}
|
||||
mi->value = int16_t(matValue / 16);
|
||||
mi->value = (int16_t)(matValue / 16);
|
||||
return mi;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user