mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 05:27: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
13
AK/OwnPtr.h
13
AK/OwnPtr.h
|
@ -1,8 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "StdLibExtras.h"
|
||||
#include "Traits.h"
|
||||
#include "Types.h"
|
||||
#include <AK/LogStream.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <AK/Traits.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
namespace AK {
|
||||
|
||||
|
@ -115,6 +116,12 @@ struct Traits<OwnPtr<T>> : public GenericTraits<OwnPtr<T>> {
|
|||
static bool equals(const OwnPtr<T>& a, const OwnPtr<T>& b) { return a.ptr() == b.ptr(); }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
inline const LogStream& operator<<(const LogStream& stream, const OwnPtr<T>& value)
|
||||
{
|
||||
return stream << value.ptr();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
using AK::make;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue