- replaced deprecated throw() with noexcept in TObjPtr

This commit is contained in:
Christoph Oelckers 2021-08-21 12:22:15 +02:00
parent b1de11dce8
commit 8bdd4befbf

View file

@ -175,7 +175,7 @@ public:
TObjPtr() = default;
TObjPtr(const TObjPtr<T> &q) = default;
TObjPtr(T q) throw()
TObjPtr(T q) noexcept
: pp(q)
{
}
@ -207,35 +207,35 @@ public:
return *this;
}
T Get() throw()
T Get() noexcept
{
return GC::ReadBarrier(pp);
}
T ForceGet() throw() //for situations where the read barrier needs to be skipped.
T ForceGet() noexcept //for situations where the read barrier needs to be skipped.
{
return pp;
}
operator T() throw()
operator T() noexcept
{
return GC::ReadBarrier(pp);
}
T &operator*()
T &operator*() noexcept
{
T q = GC::ReadBarrier(pp);
assert(q != NULL);
return *q;
}
T operator->() throw()
T operator->() noexcept
{
return GC::ReadBarrier(pp);
}
bool operator!=(T u) throw()
bool operator!=(T u) noexcept
{
return GC::ReadBarrier(o) != u;
}
bool operator==(T u) throw()
bool operator==(T u) noexcept
{
return GC::ReadBarrier(o) == u;
}