From f5e7fa4d0ea8bc8d137c03b96dbf4b6748bc048f Mon Sep 17 00:00:00 2001 From: Hendiadyoin1 Date: Sat, 22 Oct 2022 20:20:35 +0200 Subject: [PATCH] LibJS: Make Register comparable --- Userland/Libraries/LibJS/Bytecode/Register.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibJS/Bytecode/Register.h b/Userland/Libraries/LibJS/Bytecode/Register.h index 43bc29c26b9..5fa4dc0234d 100644 --- a/Userland/Libraries/LibJS/Bytecode/Register.h +++ b/Userland/Libraries/LibJS/Bytecode/Register.h @@ -25,6 +25,8 @@ public: { } + bool operator==(Register reg) const { return m_index == reg.index(); } + u32 index() const { return m_index; } private: