AK: Move some of LogStream out of line & add overloads for smart pointers.

This commit is contained in:
Andreas Kling 2019-07-04 07:05:58 +02:00
commit 1b013ba699
Notes: sideshowbarker 2024-07-19 13:23:39 +09:00
9 changed files with 87 additions and 31 deletions

View file

@ -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;