mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
minor backend update from Raze.
This commit is contained in:
parent
1957c15a41
commit
d65d1a3b82
3 changed files with 13 additions and 0 deletions
|
@ -282,6 +282,11 @@ public:
|
|||
return GC::ReadBarrier(o) == u;
|
||||
}
|
||||
|
||||
constexpr bool operator==(TObjPtr<T> u) noexcept
|
||||
{
|
||||
return ForceGet() == u.ForceGet();
|
||||
}
|
||||
|
||||
template<class U> friend inline void GC::Mark(TObjPtr<U> &obj);
|
||||
template<class U> friend FSerializer &Serialize(FSerializer &arc, const char *key, TObjPtr<U> &value, TObjPtr<U> *);
|
||||
template<class U> friend FSerializer &Serialize(FSerializer &arc, const char *key, TObjPtr<U> &value, U *);
|
||||
|
|
|
@ -232,3 +232,4 @@ inline bool BoxInRange(const DVector2& boxtl, const DVector2& boxbr, const DVect
|
|||
boxtl.Y < max(start.Y, end.Y) &&
|
||||
boxbr.Y > min(start.Y, end.Y);
|
||||
}
|
||||
|
||||
|
|
|
@ -455,6 +455,13 @@ public:
|
|||
return start;
|
||||
}
|
||||
|
||||
unsigned AddUnique(const T& obj)
|
||||
{
|
||||
auto f = Find(obj);
|
||||
if (f == Size()) Push(obj);
|
||||
return f;
|
||||
}
|
||||
|
||||
bool Pop ()
|
||||
{
|
||||
if (Count > 0)
|
||||
|
|
Loading…
Reference in a new issue