1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:38:11 +00:00

LibGUI: Move GTextPosition and GTextRange LogStream<< to their headers

This commit is contained in:
Andreas Kling 2019-11-03 09:49:05 +01:00
parent bcf3a4457f
commit 1282b778e7
3 changed files with 18 additions and 14 deletions

View file

@ -1,5 +1,8 @@
#pragma once
#include <AK/LogStream.h>
#include <AK/String.h>
class GTextPosition {
public:
GTextPosition() {}
@ -25,3 +28,10 @@ private:
int m_line { -1 };
int m_column { -1 };
};
inline const LogStream& operator<<(const LogStream& stream, const GTextPosition& value)
{
if (!value.is_valid())
return stream << "GTextPosition(Invalid)";
return stream << String::format("(%d,%d)", value.line(), value.column());
}