瀏覽代碼

AK: Always inline Optional::release_value()

This allows the compiler to optimize away the VERIFY(m_has_value) in
many cases.
Andreas Kling 3 年之前
父節點
當前提交
b4c0e27d26
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      AK/Optional.h

+ 1 - 1
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());