2012-11-05 04:34:23 +00:00
|
|
|
|
|
|
|
template<typename TrackedType>
|
2014-11-22 12:32:56 +00:00
|
|
|
inline TrackedType TRACKER_NAME_<TrackedType>::operator TRACKER_OPERATOR_ (__TRACKER_RIGHTHAND_TYPE)
|
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_)
|
|
|
|
{
|
|
|
|
case TRACKER_NOOP_RIGHTHAND_EQUAL_: isNoop = (this->TrackedValue == __TRACKER_RIGHTHAND); break;
|
|
|
|
case TRACKER_NOOP_RIGHTHAND_ZERO_: isNoop = (__TRACKER_RIGHTHAND == 0); break;
|
|
|
|
case TRACKER_NOOP_RIGHTHAND_ONE_: isNoop = (__TRACKER_RIGHTHAND == 1);
|
|
|
|
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);
|
|
|
|
return this->TrackedValue TRACKER_OPERATOR_ __TRACKER_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
|
|
|
}
|