mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-23 10:36:26 +08: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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user