2012-11-05 04:34:23 +00:00
|
|
|
|
|
|
|
template<typename TrackedType>
|
2012-11-09 22:31:02 +00:00
|
|
|
inline TrackedType __TRACKER_NAME<TrackedType>::operator __TRACKER_OPERATOR (__TRACKER_RIGHTHAND_TYPE)
|
2012-11-05 04:34:23 +00:00
|
|
|
{
|
|
|
|
bool isNoop;
|
|
|
|
|
|
|
|
switch (__TRACKER_NOOP) {
|
|
|
|
case __TRACKER_NOOP_RIGHTHAND_EQUAL:
|
|
|
|
isNoop = this->TrackedValue == __TRACKER_RIGHTHAND;
|
|
|
|
break;
|
|
|
|
case __TRACKER_NOOP_RIGHTHAND_ZERO:
|
|
|
|
isNoop = __TRACKER_RIGHTHAND == 0;
|
|
|
|
break;
|
2012-11-09 22:31:02 +00:00
|
|
|
case __TRACKER_NOOP_RIGHTHAND_ONE:
|
|
|
|
isNoop = __TRACKER_RIGHTHAND == 1;
|
|
|
|
break;
|
2012-11-05 04:34:23 +00:00
|
|
|
default:
|
|
|
|
case __TRACKER_NEVER:
|
|
|
|
isNoop = false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isNoop) {
|
|
|
|
|
2012-11-14 23:32:43 +00:00
|
|
|
__TRACKER_GLOBAL_HOOK((uintptr_t)&this->TrackedValue);
|
2012-11-05 04:34:23 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|