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.
This commit is contained in:
Sergey Bugaev 2020-05-31 21:54:44 +03:00 committed by Andreas Kling
commit c3db694d9b
Notes: sideshowbarker 2024-07-19 05:55:29 +09:00

View file

@ -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;