diff --git a/AK/NonnullOwnPtr.h b/AK/NonnullOwnPtr.h index 5fa314b927..6e3f3b5963 100644 --- a/AK/NonnullOwnPtr.h +++ b/AK/NonnullOwnPtr.h @@ -143,12 +143,16 @@ private: T* m_ptr = nullptr; }; +#if !defined(KERNEL) + template inline NonnullOwnPtr adopt_own(T& object) { return NonnullOwnPtr(NonnullOwnPtr::Adopt, object); } +#endif + template inline NonnullOwnPtr make(Args&&... args) @@ -180,6 +184,8 @@ struct Formatter> : Formatter { } +#if !defined(KERNEL) using AK::adopt_own; +#endif using AK::make; using AK::NonnullOwnPtr;