mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:47:45 +00:00
AK: Move some of LogStream out of line & add overloads for smart pointers.
This commit is contained in:
parent
07d11a9b6b
commit
1b013ba699
9 changed files with 87 additions and 31 deletions
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "Weakable.h"
|
||||
#include <AK/LogStream.h>
|
||||
#include <AK/Weakable.h>
|
||||
|
||||
namespace AK {
|
||||
|
||||
|
@ -66,6 +67,12 @@ inline WeakPtr<T> Weakable<T>::make_weak_ptr()
|
|||
return WeakPtr<T>(m_link.copy_ref());
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline const LogStream& operator<<(const LogStream& stream, const WeakPtr<T>& value)
|
||||
{
|
||||
return stream << value.ptr();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
using AK::WeakPtr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue