mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 19:46:55 +08:00
Use a global instead of a variable in pos
This commit is contained in:
@@ -30,6 +30,10 @@
|
||||
#include "pawns.h"
|
||||
#include "thread.h"
|
||||
|
||||
namespace Eval {
|
||||
bool useNNUE;
|
||||
}
|
||||
|
||||
namespace Trace {
|
||||
|
||||
enum Tracing { NO_TRACE, TRACE };
|
||||
@@ -900,7 +904,7 @@ make_v:
|
||||
/// evaluation of the position from the point of view of the side to move.
|
||||
|
||||
Value Eval::evaluate(const Position& pos) {
|
||||
if (pos.use_nnue())
|
||||
if (Eval::useNNUE)
|
||||
return NNUE::evaluate(pos);
|
||||
else
|
||||
return Evaluation<NO_TRACE>(pos).value();
|
||||
@@ -921,7 +925,7 @@ std::string Eval::trace(const Position& pos) {
|
||||
|
||||
Value v;
|
||||
|
||||
if (pos.use_nnue())
|
||||
if (Eval::useNNUE)
|
||||
{
|
||||
v = NNUE::evaluate(pos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user