2012-11-05 04:34:23 +00:00
|
|
|
|
2019-04-08 06:27:48 +00:00
|
|
|
template <typename TrackedType>
|
|
|
|
template <typename RightHandType>
|
|
|
|
inline TrackedType TRACKER_NAME_<TrackedType>::operator TRACKER_OPERATOR_ (RightHandType rightHand)
|
2012-11-05 04:34:23 +00:00
|
|
|
{
|
2018-10-25 23:30:56 +00:00
|
|
|
bool isNoop = false;
|
2012-11-05 04:34:23 +00:00
|
|
|
|
2018-10-25 23:30:56 +00:00
|
|
|
switch (TRACKER_NOOP_)
|
|
|
|
{
|
2019-04-08 06:27:48 +00:00
|
|
|
case TRACKER_NOOP_RIGHTHAND_EQUAL_: isNoop = (this->TrackedValue == rightHand); break;
|
|
|
|
case TRACKER_NOOP_RIGHTHAND_ZERO_: isNoop = (rightHand == 0); break;
|
|
|
|
case TRACKER_NOOP_RIGHTHAND_ONE_: isNoop = (rightHand == 1);
|
2018-10-25 23:30:56 +00:00
|
|
|
fallthrough__;
|
|
|
|
// case __TRACKER_NEVER:
|
2012-11-05 04:34:23 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2018-10-25 23:30:56 +00:00
|
|
|
if (!isNoop)
|
|
|
|
{
|
|
|
|
TRACKER_GLOBAL_HOOK_((uintptr_t) & this->TrackedValue);
|
2019-04-08 06:27:48 +00:00
|
|
|
return this->TrackedValue TRACKER_OPERATOR_ rightHand;
|
2012-11-05 04:34:23 +00:00
|
|
|
}
|
2018-10-25 23:30:56 +00:00
|
|
|
else return this->TrackedValue;
|
2012-11-26 08:26:04 +00:00
|
|
|
}
|