Gump redux

git-svn-id: https://svn.eduke32.com/eduke32@7747 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-06-25 21:51:47 +00:00 committed by Christoph Oelckers
parent 3269875e7b
commit f51b2a2cb3

View file

@ -34,61 +34,61 @@ class TRACKER_NAME__
return this->value--;
}
template <typename Tt> inline T operator=(Tt operand)
template <typename U> inline T operator=(U operand)
{
TRACKER_HOOK_((intptr_t) & this->value);
return this->value = (T)operand;
}
template <typename Tt> inline T operator+=(Tt operand)
template <typename U> inline T operator+=(U operand)
{
TRACKER_HOOK_((intptr_t) & this->value);
return this->value += (T)operand;
}
template <typename Tt> inline T operator-=(Tt operand)
template <typename U> inline T operator-=(U operand)
{
TRACKER_HOOK_((intptr_t) & this->value);
return this->value -= (T)operand;
}
template <typename Tt> inline T operator*=(Tt operand)
template <typename U> inline T operator*=(U operand)
{
TRACKER_HOOK_((intptr_t) & this->value);
return this->value *= (T)operand;
}
template <typename Tt> inline T operator/=(Tt operand)
template <typename U> inline T operator/=(U operand)
{
TRACKER_HOOK_((intptr_t) & this->value);
return this->value /= (T)operand;
}
template <typename Tt> inline T operator|=(Tt operand)
template <typename U> inline T operator|=(U operand)
{
TRACKER_HOOK_((intptr_t) & this->value);
return this->value |= (T)operand;
}
template <typename Tt> inline T operator&=(Tt operand)
template <typename U> inline T operator&=(U operand)
{
TRACKER_HOOK_((intptr_t) & this->value);
return this->value &= (T)operand;
}
template <typename Tt> inline T operator^=(Tt operand)
template <typename U> inline T operator^=(U operand)
{
TRACKER_HOOK_((intptr_t) & this->value);
return this->value ^= (T)operand;
}
template <typename Tt> inline T operator<<=(Tt operand)
template <typename U> inline T operator<<=(U operand)
{
TRACKER_HOOK_((intptr_t) & this->value);
return this->value <<= (T)operand;
}
template <typename Tt> inline T operator>>=(Tt operand)
template <typename U> inline T operator>>=(U operand)
{
TRACKER_HOOK_((intptr_t) & this->value);
return this->value >>= (T)operand;
@ -97,13 +97,13 @@ class TRACKER_NAME__
inline operator T() const { return this->value; }
inline T cast() const { return this->value; }
struct is_signed
{
static constexpr bool value = std::is_signed<T>::value;
};
struct is_unsigned
{
static constexpr bool value = std::is_unsigned<T>::value;
};
};
template <typename T> struct is_signed<TRACKER_NAME__<T>>
{
static constexpr bool value = std::is_signed<T>::value;
};
template <typename T> struct is_unsigned<TRACKER_NAME__<T>>
{
static constexpr bool value = std::is_unsigned<T>::value;
};