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

This commit is contained in:
Andreas Kling 2019-11-03 09:49:05 +01:00
commit 1282b778e7
Notes: sideshowbarker 2024-07-19 11:27:32 +09:00
3 changed files with 18 additions and 14 deletions

View file

@ -1,5 +1,6 @@
#pragma once
#include <AK/LogStream.h>
#include <LibGUI/GTextPosition.h>
class GTextRange {
@ -55,3 +56,10 @@ private:
GTextPosition m_start;
GTextPosition m_end;
};
inline const LogStream& operator<<(const LogStream& stream, const GTextRange& value)
{
if (!value.is_valid())
return stream << "GTextRange(Invalid)";
return stream << value.start() << '-' << value.end();
}