resolved constexpr constructor not mem-initializing member variables

This commit is contained in:
Triston Caton 2025-10-04 19:38:30 -04:00
parent 4fc85ba717
commit 8d1e95b3f3

View file

@ -54,7 +54,7 @@ public:
private:
friend class WeakRefBase;
constexpr explicit WeakReference(WeakRefBase *object) { mObject = object; mRefCount = 0; }
constexpr explicit WeakReference(WeakRefBase *object) :mObject(object), mRefCount(0) {}
~WeakReference() { AssertFatal(mObject==nullptr, "Deleting weak reference which still points at an object."); }
// Object we reference
@ -469,4 +469,4 @@ inline T& Deref( StrongWeakRefPtr< T >& ref )
return *ref;
}
#endif
#endif