mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:17:35 +00:00
AK: Fix some WeakPtr copy constructor variants not copying the link
This commit is contained in:
parent
54eeb8ee9a
commit
34b3d92a13
2 changed files with 4 additions and 3 deletions
|
@ -30,6 +30,7 @@
|
|||
#include "Atomic.h"
|
||||
#include "RefCounted.h"
|
||||
#include "RefPtr.h"
|
||||
#include "StdLibExtras.h"
|
||||
#ifdef KERNEL
|
||||
# include <Kernel/Arch/i386/CPU.h>
|
||||
#endif
|
||||
|
@ -52,7 +53,7 @@ class WeakLink : public RefCounted<WeakLink> {
|
|||
friend class WeakPtr;
|
||||
|
||||
public:
|
||||
template<typename T, typename PtrTraits = RefPtrTraits<T>>
|
||||
template<typename T, typename PtrTraits = RefPtrTraits<T>, typename EnableIf<IsBaseOf<RefCountedBase, T>::value>::Type* = nullptr>
|
||||
RefPtr<T, PtrTraits> strong_ref() const
|
||||
{
|
||||
RefPtr<T, PtrTraits> ref;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue