浏览代码

LibJS: Declare HeapFunction::function() with [[nodiscard]]

Aliaksandr Kalenik 1 年之前
父节点
当前提交
c46ce53ce3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibJS/Heap/HeapFunction.h

+ 1 - 1
Userland/Libraries/LibJS/Heap/HeapFunction.h

@@ -24,7 +24,7 @@ public:
 
     virtual ~HeapFunction() override = default;
 
-    Function<T> const& function() const { return m_function; }
+    [[nodiscard]] Function<T> const& function() const { return m_function; }
 
 private:
     HeapFunction(Function<T> function)