mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 20:57:10 +00:00
Use operator() instead of apply() in endgames
It is more idiomatic for a functor (a function object) as are the endgames. Suggested by Rein Halbersma. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
+2
-2
@@ -97,12 +97,12 @@ inline ScaleFactor MaterialInfo::scale_factor(const Position& pos, Color c) cons
|
||||
if (!scalingFunction[c])
|
||||
return ScaleFactor(factor[c]);
|
||||
|
||||
ScaleFactor sf = scalingFunction[c]->apply(pos);
|
||||
ScaleFactor sf = (*scalingFunction[c])(pos);
|
||||
return sf == SCALE_FACTOR_NONE ? ScaleFactor(factor[c]) : sf;
|
||||
}
|
||||
|
||||
inline Value MaterialInfo::evaluate(const Position& pos) const {
|
||||
return evaluationFunction->apply(pos);
|
||||
return (*evaluationFunction)(pos);
|
||||
}
|
||||
|
||||
inline Score MaterialInfo::material_value() const {
|
||||
|
||||
Reference in New Issue
Block a user