mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00: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:
parent
5973e09854
commit
078354060e
2 changed files with 7 additions and 7 deletions
|
@ -192,7 +192,7 @@ MaterialInfo* MaterialInfoTable::get_material_info(const Position& pos) {
|
||||||
|
|
||||||
// Clear the MaterialInfo object, and set its key
|
// Clear the MaterialInfo object, and set its key
|
||||||
memset(mi, 0, sizeof(MaterialInfo));
|
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;
|
mi->key = key;
|
||||||
|
|
||||||
// Store game phase
|
// Store game phase
|
||||||
|
@ -353,7 +353,7 @@ MaterialInfo* MaterialInfoTable::get_material_info(const Position& pos) {
|
||||||
}
|
}
|
||||||
matValue += sign * v;
|
matValue += sign * v;
|
||||||
}
|
}
|
||||||
mi->value = int16_t(matValue / 16);
|
mi->value = (int16_t)(matValue / 16);
|
||||||
return mi;
|
return mi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
10
src/tt.h
10
src/tt.h
|
@ -59,10 +59,10 @@ public:
|
||||||
|
|
||||||
key32 = k;
|
key32 = k;
|
||||||
data = (m & 0x1FFFF) | (t << 21) | (g << 23);
|
data = (m & 0x1FFFF) | (t << 21) | (g << 23);
|
||||||
value16 = int16_t(v);
|
value16 = (int16_t)v;
|
||||||
depth16 = int16_t(d);
|
depth16 = (int16_t)d;
|
||||||
staticValue = int16_t(statV);
|
staticValue = (int16_t)statV;
|
||||||
staticValueMargin = int16_t(kd);
|
staticValueMargin = (int16_t)kd;
|
||||||
}
|
}
|
||||||
void set_generation(int g) { data = move() | (type() << 21) | (g << 23); }
|
void set_generation(int g) { data = move() | (type() << 21) | (g << 23); }
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ extern TranspositionTable TT;
|
||||||
|
|
||||||
inline TTEntry* TranspositionTable::first_entry(const Key posKey) const {
|
inline TTEntry* TranspositionTable::first_entry(const Key posKey) const {
|
||||||
|
|
||||||
return entries[uint32_t(posKey) & (size - 1)].data;
|
return entries[((uint32_t)posKey) & (size - 1)].data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue