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
|
|
|
{
|
|
|
|
bool isNoop;
|
|
|
|
|
2014-11-22 12:32:56 +00:00
|
|
|
switch (TRACKER_NOOP_) {
|
|
|
|
case TRACKER_NOOP_RIGHTHAND_EQUAL_:
|
2012-11-05 04:34:23 +00:00
|
|
|
isNoop = this->TrackedValue == __TRACKER_RIGHTHAND;
|
|
|
|
break;
|
2014-11-22 12:32:56 +00:00
|
|
|
case TRACKER_NOOP_RIGHTHAND_ZERO_:
|
2012-11-05 04:34:23 +00:00
|
|
|
isNoop = __TRACKER_RIGHTHAND == 0;
|
|
|
|
break;
|
2014-11-22 12:32:56 +00:00
|
|
|
case TRACKER_NOOP_RIGHTHAND_ONE_:
|
2012-11-09 22:31:02 +00:00
|
|
|
isNoop = __TRACKER_RIGHTHAND == 1;
|
|
|
|
break;
|
2012-11-05 04:34:23 +00:00
|
|
|
default:
|
|
|
|
case __TRACKER_NEVER:
|
|
|
|
isNoop = false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isNoop) {
|
|
|
|
|
2014-11-22 12:32:56 +00:00
|
|
|
TRACKER_GLOBAL_HOOK_((uintptr_t)&this->TrackedValue);
|
|
|
|
return (this->TrackedValue TRACKER_OPERATOR_ __TRACKER_RIGHTHAND);
|
2012-11-09 22:31:02 +00:00
|
|
|
} else {
|
|
|
|
return this->TrackedValue;
|
2012-11-05 04:34:23 +00:00
|
|
|
}
|
2012-11-26 08:26:04 +00:00
|
|
|
}
|