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 21:04:32 +01:00
parent 11a7980976
commit 98352a5e84
3 changed files with 24 additions and 24 deletions
+2 -2
View File
@@ -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 {