From c3db694d9b6423047cdd711dee996edc2e52ee88 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Sun, 31 May 2020 21:54:44 +0300 Subject: [PATCH] AK: Always inline some Checked methods Once again, we need to hint the compiler that it should inline the function, and then it is able to eliminate the assertion. --- AK/Checked.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AK/Checked.h b/AK/Checked.h index d4e9a84a81..d0877082b4 100644 --- a/AK/Checked.h +++ b/AK/Checked.h @@ -166,13 +166,13 @@ public: return m_overflow; } - bool operator!() const + ALWAYS_INLINE bool operator!() const { ASSERT(!m_overflow); return !m_value; } - T value() const + ALWAYS_INLINE T value() const { ASSERT(!m_overflow); return m_value;