From b4c0e27d267955e747792e55b71b222c9dc27f5a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 25 Oct 2021 14:31:46 +0200 Subject: [PATCH] AK: Always inline Optional::release_value() This allows the compiler to optimize away the VERIFY(m_has_value) in many cases. --- AK/Optional.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/Optional.h b/AK/Optional.h index 12a0ad1d58..a2d2a7c4e2 100644 --- a/AK/Optional.h +++ b/AK/Optional.h @@ -152,7 +152,7 @@ public: return release_value(); } - [[nodiscard]] T release_value() + [[nodiscard]] ALWAYS_INLINE T release_value() { VERIFY(m_has_value); T released_value = move(value());