Browse Source

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

Aliaksandr Kalenik 1 year ago
parent
commit
c46ce53ce3
1 changed files with 1 additions and 1 deletions
  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;
     virtual ~HeapFunction() override = default;
 
 
-    Function<T> const& function() const { return m_function; }
+    [[nodiscard]] Function<T> const& function() const { return m_function; }
 
 
 private:
 private:
     HeapFunction(Function<T> function)
     HeapFunction(Function<T> function)