]> git.sesse.net Git - stockfish/commitdiff
Use polymorphism to resolve map() overloading
authorMarco Costalba <mcostalba@gmail.com>
Sun, 1 Apr 2012 14:12:39 +0000 (15:12 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 1 Apr 2012 15:16:51 +0000 (16:16 +0100)
The 2 overload functions map() accept a pointer to
EndgameBase<Value> or a pointer to EndgameBase<ScaleFactor>.

Because Endgame<E> is derived from one of them we can
directly use a pointer to this class to resolve the
overload as is needed in Endgames::add().

Also made class Endgames fully parametrized and no more
hardcoded to the types (Value or ScaleFactor) of endgames
stored.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>

No differences found