diff --git a/SharedGraphics/Point.h b/SharedGraphics/Point.h index 0530da9adb..0f3f65beb8 100644 --- a/SharedGraphics/Point.h +++ b/SharedGraphics/Point.h @@ -1,6 +1,7 @@ #pragma once #include +#include class Rect; struct WSAPI_Point; @@ -71,3 +72,8 @@ private: int m_x { 0 }; int m_y { 0 }; }; + +inline const LogStream& operator<<(const LogStream& stream, const Point& value) +{ + return stream << value.to_string(); +} diff --git a/SharedGraphics/Rect.h b/SharedGraphics/Rect.h index 3fcc8649a1..c9a7ededf3 100644 --- a/SharedGraphics/Rect.h +++ b/SharedGraphics/Rect.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include #include @@ -244,3 +245,8 @@ inline void Point::constrain(const Rect& rect) else if (y() > rect.bottom()) set_y(rect.bottom()); } + +inline const LogStream& operator<<(const LogStream& stream, const Rect& value) +{ + return stream << value.to_string(); +} diff --git a/SharedGraphics/Size.h b/SharedGraphics/Size.h index e38c47e66d..a499dbc2fd 100644 --- a/SharedGraphics/Size.h +++ b/SharedGraphics/Size.h @@ -1,6 +1,7 @@ #pragma once #include +#include struct WSAPI_Size; @@ -57,3 +58,8 @@ private: int m_width { 0 }; int m_height { 0 }; }; + +inline const LogStream& operator<<(const LogStream& stream, const Size& value) +{ + return stream << value.to_string(); +}