mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 04:00:42 +00:00
c2921abe4a
git-svn-id: https://svn.eduke32.com/eduke32@7526 1a8010ca-5511-0410-912e-c29ae57300e0
25 lines
769 B
C++
25 lines
769 B
C++
|
|
template <typename TrackedType>
|
|
template <typename RightHandType>
|
|
inline TrackedType TRACKER_NAME_<TrackedType>::operator TRACKER_OPERATOR_ (RightHandType rightHand)
|
|
{
|
|
bool isNoop = false;
|
|
|
|
switch (TRACKER_NOOP_)
|
|
{
|
|
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);
|
|
fallthrough__;
|
|
// case __TRACKER_NEVER:
|
|
default:
|
|
break;
|
|
}
|
|
|
|
if (!isNoop)
|
|
{
|
|
TRACKER_GLOBAL_HOOK_((uintptr_t) & this->TrackedValue);
|
|
return this->TrackedValue TRACKER_OPERATOR_ rightHand;
|
|
}
|
|
else return this->TrackedValue;
|
|
}
|