mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 18:17:02 +08:00
Endgame's apply() method can be 'const'
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -68,7 +68,7 @@ class EndgameFunctionBase {
|
||||
public:
|
||||
EndgameFunctionBase(Color c) : strongerSide(c), weakerSide(opposite_color(c)) {}
|
||||
virtual ~EndgameFunctionBase() {}
|
||||
virtual T apply(const Position&) = 0;
|
||||
virtual T apply(const Position&) const = 0;
|
||||
Color color() const { return strongerSide; }
|
||||
|
||||
protected:
|
||||
@@ -85,14 +85,14 @@ template<EndgameType>
|
||||
struct EvaluationFunction : public EndgameEvaluationFunctionBase {
|
||||
typedef EndgameEvaluationFunctionBase Base;
|
||||
explicit EvaluationFunction(Color c): EndgameEvaluationFunctionBase(c) {}
|
||||
Value apply(const Position&);
|
||||
Value apply(const Position&) const;
|
||||
};
|
||||
|
||||
template<EndgameType>
|
||||
struct ScalingFunction : public EndgameScalingFunctionBase {
|
||||
typedef EndgameScalingFunctionBase Base;
|
||||
explicit ScalingFunction(Color c) : EndgameScalingFunctionBase(c) {}
|
||||
ScaleFactor apply(const Position&);
|
||||
ScaleFactor apply(const Position&) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user