mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
Slightly simplify TrackedType operator stuff
git-svn-id: https://svn.eduke32.com/eduke32@7102 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f1cf0bafdd
commit
ffab1f7d71
1 changed files with 13 additions and 19 deletions
|
@ -2,29 +2,23 @@
|
||||||
template<typename TrackedType>
|
template<typename TrackedType>
|
||||||
inline TrackedType TRACKER_NAME_<TrackedType>::operator TRACKER_OPERATOR_ (__TRACKER_RIGHTHAND_TYPE)
|
inline TrackedType TRACKER_NAME_<TrackedType>::operator TRACKER_OPERATOR_ (__TRACKER_RIGHTHAND_TYPE)
|
||||||
{
|
{
|
||||||
bool isNoop;
|
bool isNoop = false;
|
||||||
|
|
||||||
switch (TRACKER_NOOP_) {
|
switch (TRACKER_NOOP_)
|
||||||
case TRACKER_NOOP_RIGHTHAND_EQUAL_:
|
{
|
||||||
isNoop = this->TrackedValue == __TRACKER_RIGHTHAND;
|
case TRACKER_NOOP_RIGHTHAND_EQUAL_: isNoop = (this->TrackedValue == __TRACKER_RIGHTHAND); break;
|
||||||
break;
|
case TRACKER_NOOP_RIGHTHAND_ZERO_: isNoop = (__TRACKER_RIGHTHAND == 0); break;
|
||||||
case TRACKER_NOOP_RIGHTHAND_ZERO_:
|
case TRACKER_NOOP_RIGHTHAND_ONE_: isNoop = (__TRACKER_RIGHTHAND == 1);
|
||||||
isNoop = __TRACKER_RIGHTHAND == 0;
|
fallthrough__;
|
||||||
break;
|
// case __TRACKER_NEVER:
|
||||||
case TRACKER_NOOP_RIGHTHAND_ONE_:
|
|
||||||
isNoop = __TRACKER_RIGHTHAND == 1;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
case __TRACKER_NEVER:
|
|
||||||
isNoop = false;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isNoop) {
|
if (!isNoop)
|
||||||
|
{
|
||||||
TRACKER_GLOBAL_HOOK_((uintptr_t)&this->TrackedValue);
|
TRACKER_GLOBAL_HOOK_((uintptr_t) & this->TrackedValue);
|
||||||
return (this->TrackedValue TRACKER_OPERATOR_ __TRACKER_RIGHTHAND);
|
return this->TrackedValue TRACKER_OPERATOR_ __TRACKER_RIGHTHAND;
|
||||||
} else {
|
|
||||||
return this->TrackedValue;
|
|
||||||
}
|
}
|
||||||
|
else return this->TrackedValue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue