mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Evaluate: weight_option() is static
Declare function under local namespace. This removes a warning from the picky Intel compiler. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -275,6 +275,7 @@ namespace {
|
|||||||
int count_1s_8bit(Bitboard b);
|
int count_1s_8bit(Bitboard b);
|
||||||
|
|
||||||
int compute_weight(int uciWeight, int internalWeight);
|
int compute_weight(int uciWeight, int internalWeight);
|
||||||
|
int weight_option(const std::string& opt, int weight);
|
||||||
void init_safety();
|
void init_safety();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -539,11 +540,6 @@ void quit_eval() {
|
|||||||
/// read_weights() reads evaluation weights from the corresponding UCI
|
/// read_weights() reads evaluation weights from the corresponding UCI
|
||||||
/// parameters.
|
/// parameters.
|
||||||
|
|
||||||
int weight_option(const std::string& opt, int weight) {
|
|
||||||
|
|
||||||
return compute_weight(get_option_value_int(opt), weight);
|
|
||||||
}
|
|
||||||
|
|
||||||
void read_weights(Color us) {
|
void read_weights(Color us) {
|
||||||
|
|
||||||
WeightMobilityMidgame = weight_option("Mobility (Middle Game)", WeightMobilityMidgameInternal);
|
WeightMobilityMidgame = weight_option("Mobility (Middle Game)", WeightMobilityMidgameInternal);
|
||||||
@@ -1147,6 +1143,13 @@ namespace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// helper used in read_weights()
|
||||||
|
int weight_option(const std::string& opt, int weight) {
|
||||||
|
|
||||||
|
return compute_weight(get_option_value_int(opt), weight);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// init_safety() initizes the king safety evaluation, based on UCI
|
// init_safety() initizes the king safety evaluation, based on UCI
|
||||||
// parameters. It is called from read_weights().
|
// parameters. It is called from read_weights().
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user