From b4329a8eecc7d5510c7df19d43db8d9da4322b1e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 14 Jul 2019 10:59:26 +0200 Subject: [PATCH] CObject: Add LogStream operator<< for CObject. --- Libraries/LibCore/CObject.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Libraries/LibCore/CObject.h b/Libraries/LibCore/CObject.h index 58c8cf5ad2..d0df0530be 100644 --- a/Libraries/LibCore/CObject.h +++ b/Libraries/LibCore/CObject.h @@ -99,3 +99,8 @@ inline void CObject::for_each_child_of_type(Callback callback) return IterationDecision::Continue; }); } + +inline const LogStream& operator<<(const LogStream& stream, const CObject& object) +{ + return stream << object.class_name() << '{' << &object << '}'; +}