ActorModelData cleanup in preparation for decoupled model animations

This commit is contained in:
Ricardo Luís Vaz Silva 2023-11-17 20:34:43 -03:00 committed by Rachael Alexanderson
commit 1a8dfd2dfa
9 changed files with 73 additions and 52 deletions

View file

@ -210,8 +210,8 @@ class TObjPtr
{
union
{
T pp;
DObject *o;
mutable T pp;
mutable DObject *o;
};
public:
@ -273,16 +273,22 @@ public:
{
return GC::ReadBarrier(pp);
}
constexpr bool operator!=(T u) noexcept
constexpr const T operator->() const noexcept
{
return GC::ReadBarrier(pp);
}
constexpr bool operator!=(T u) const noexcept
{
return GC::ReadBarrier(o) != u;
}
constexpr bool operator==(T u) noexcept
constexpr bool operator==(T u) const noexcept
{
return GC::ReadBarrier(o) == u;
}
constexpr bool operator==(TObjPtr<T> u) noexcept
constexpr bool operator==(TObjPtr<T> u) const noexcept
{
return ForceGet() == u.ForceGet();
}