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:
parent
ed436a36ba
commit
2e2865d34b
1 changed files with 2 additions and 2 deletions
|
@ -232,7 +232,7 @@ namespace Stockfish::Eval::NNUE {
|
||||||
|
|
||||||
buffer[0] = (v < 0 ? '-' : v > 0 ? '+' : ' ');
|
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)
|
if (cp >= 10000)
|
||||||
{
|
{
|
||||||
|
@ -261,7 +261,7 @@ namespace Stockfish::Eval::NNUE {
|
||||||
static void format_cp_aligned_dot(Value v, char* buffer) {
|
static void format_cp_aligned_dot(Value v, char* buffer) {
|
||||||
buffer[0] = (v < 0 ? '-' : v > 0 ? '+' : ' ');
|
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)
|
if (cp >= 10000)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue