HeroBonus: remove unused template

This commit is contained in:
Konstantin
2023-05-02 00:54:53 +03:00
parent 4866c2fe5c
commit ce37380e99
-23
View File
@@ -297,8 +297,6 @@ public:
/// Struct for handling bonuses of several types. Can be transferred to any hero
struct DLL_LINKAGE Bonus : public std::enable_shared_from_this<Bonus>
{
enum { EVERY_TYPE = -1 };
enum BonusType
{
#define BONUS_NAME(x) x,
@@ -583,27 +581,6 @@ public:
}
};
template<typename T> //can be same, needed for subtype field
class CSelectFieldEqualOrEvery
{
T Bonus::*ptr;
T val;
public:
CSelectFieldEqualOrEvery(T Bonus::*Ptr, const T &Val)
: ptr(Ptr), val(Val)
{
}
bool operator()(const Bonus *bonus) const
{
return (bonus->*ptr == val) || (bonus->*ptr == static_cast<T>(Bonus::EVERY_TYPE));
}
CSelectFieldEqualOrEvery& operator()(const T &setVal)
{
val = setVal;
return *this;
}
};
class DLL_LINKAGE CWillLastTurns
{
public: