summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@serenityos.org>2020-05-31 21:54:44 +0300
committerAndreas Kling <kling@serenityos.org>2020-05-31 21:38:50 +0200
commitc3db694d9b6423047cdd711dee996edc2e52ee88 (patch)
treeae8622f2c282c23e0631d63ccd3ac3f5e53899aa /AK
parent75e42648e11511401721da3ee00ca68afd1d4366 (diff)
downloadserenity-c3db694d9b6423047cdd711dee996edc2e52ee88.zip
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.
Diffstat (limited to 'AK')
-rw-r--r--AK/Checked.h4
1 files 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;