From e0a03147c6025995c26de4d03bde4eefe4ffd974 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Thu, 27 Mar 2025 17:31:31 +0000 Subject: [PATCH] LibGfx: Make UnicodeRange comparable --- Libraries/LibGfx/Font/UnicodeRange.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Libraries/LibGfx/Font/UnicodeRange.h b/Libraries/LibGfx/Font/UnicodeRange.h index 2d58be5d14d..db1fc842497 100644 --- a/Libraries/LibGfx/Font/UnicodeRange.h +++ b/Libraries/LibGfx/Font/UnicodeRange.h @@ -35,6 +35,12 @@ public: return MUST(String::formatted("U+{:x}-{:x}", m_min_code_point, m_max_code_point)); } + bool operator==(UnicodeRange const& other) const + { + return m_min_code_point == other.m_min_code_point + && m_max_code_point == other.m_max_code_point; + } + private: u32 m_min_code_point; u32 m_max_code_point;