mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +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 <AK/Assertions.h>
|
||||
#include <AK/LogStream.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
#ifdef __clang__
|
||||
|
@ -239,6 +240,12 @@ inline NonnullRefPtr<T> adopt(T& object)
|
|||
return NonnullRefPtr<T>(NonnullRefPtr<T>::Adopt, object);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline const LogStream& operator<<(const LogStream& stream, const NonnullRefPtr<T>& value)
|
||||
{
|
||||
return stream << value.ptr();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
using AK::adopt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue