1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 11:39:15 +00:00

Fix build error on OSX

directly use integer version for cp calculation.

fixes https://github.com/official-stockfish/Stockfish/issues/3573

closes https://github.com/official-stockfish/Stockfish/pull/3574

No functional change
This commit is contained in:
Joost VandeVondele 2021-06-21 08:23:50 +02:00
parent ed436a36ba
commit 2e2865d34b

View file

@ -232,7 +232,7 @@ namespace Stockfish::Eval::NNUE {
buffer[0] = (v < 0 ? '-' : v > 0 ? '+' : ' ');
int cp = (int)(std::abs(100.0 * double(v) / PawnValueEg));
int cp = std::abs(100 * v / PawnValueEg);
if (cp >= 10000)
{
@ -261,7 +261,7 @@ namespace Stockfish::Eval::NNUE {
static void format_cp_aligned_dot(Value v, char* buffer) {
buffer[0] = (v < 0 ? '-' : v > 0 ? '+' : ' ');
int cp = (int)(std::abs(100.0 * double(v) / PawnValueEg));
int cp = std::abs(100 * v / PawnValueEg);
if (cp >= 10000)
{