mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1044658 - 3/6 - make WeakPtr<const T> work - r=froydnj
This commit is contained in:
parent
dcd279dab4
commit
74bc5a0332
@ -140,6 +140,12 @@ public:
|
||||
return WeakPtr<T>(weakRef);
|
||||
}
|
||||
|
||||
WeakPtr<const T> asWeakPtr() const
|
||||
{
|
||||
WeakPtr<T> p = const_cast<SupportsWeakPtr*>(this)->asWeakPtr();
|
||||
return *reinterpret_cast<WeakPtr<const T>*>(&p);
|
||||
}
|
||||
|
||||
protected:
|
||||
~SupportsWeakPtr()
|
||||
{
|
||||
@ -160,7 +166,7 @@ template <typename T>
|
||||
class WeakPtr
|
||||
{
|
||||
public:
|
||||
WeakPtr(const WeakPtr<T>& aOther)
|
||||
WeakPtr(const WeakPtr& aOther)
|
||||
: mRef(aOther.mRef)
|
||||
{}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user