mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 07:27:46 +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
@@ -75,7 +75,7 @@ struct EndgameBase {
|
||||
|
||||
virtual ~EndgameBase() {}
|
||||
virtual Color color() const = 0;
|
||||
virtual T apply(const Position&) const = 0;
|
||||
virtual T operator()(const Position&) const = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ struct Endgame : public EndgameBase<T> {
|
||||
|
||||
explicit Endgame(Color c) : strongerSide(c), weakerSide(flip(c)) {}
|
||||
Color color() const { return strongerSide; }
|
||||
T apply(const Position&) const;
|
||||
T operator()(const Position&) const;
|
||||
|
||||
private:
|
||||
Color strongerSide, weakerSide;
|
||||
|
||||
Reference in New Issue
Block a user