X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fendgame.h;h=a9634738bee0232c5c03117d62a21688a1a465cf;hp=af5da0519ec8bb0bc624ea03459c9eff8dac2c79;hb=3b67636f0ecb2ec7e61e9f4adf02a7d4cae89f0a;hpb=48e39c5c8e671a37f09732d4a55d93d5e2d38550 diff --git a/src/endgame.h b/src/endgame.h index af5da051..a9634738 100644 --- a/src/endgame.h +++ b/src/endgame.h @@ -89,12 +89,11 @@ private: /// and scaling base objects. Then we use polymorphism to invoke the actual /// endgame function calling its apply() method that is virtual. -class Endgames { +struct Endgames { - typedef std::map* > EFMap; - typedef std::map* > SFMap; + template + struct EMap { typedef std::map*> type; }; -public: Endgames(); ~Endgames(); template EndgameBase* get(Key key) const; @@ -103,10 +102,10 @@ private: template void add(const std::string& keyCode); // Here we store two maps, for evaluate and scaling functions... - std::pair maps; + std::pair::type, EMap::type> maps; // ...and here is the accessing template function - template const std::map& map() const; + template const typename EMap::type& map() const; }; #endif // !defined(ENDGAME_H_INCLUDED)