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:
Marco Costalba
2011-12-05 20:58:23 +01:00
parent 11a7980976
commit 98352a5e84
3 changed files with 24 additions and 24 deletions
+2 -2
View File
@@ -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;