Browse Source

LibWeb: Mark `WebIDL::ExceptionOr<T>` as `[[nodiscard]]`

Linus Groh 2 years ago
parent
commit
a80da456a5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Userland/Libraries/LibWeb/WebIDL/ExceptionOr.h

+ 2 - 2
Userland/Libraries/LibWeb/WebIDL/ExceptionOr.h

@@ -33,7 +33,7 @@ struct SimpleException {
 };
 };
 
 
 template<typename ValueType>
 template<typename ValueType>
-class ExceptionOr {
+class [[nodiscard]] ExceptionOr {
 public:
 public:
     ExceptionOr() requires(IsSame<ValueType, Empty>)
     ExceptionOr() requires(IsSame<ValueType, Empty>)
         : m_result(Empty {})
         : m_result(Empty {})
@@ -119,7 +119,7 @@ private:
 };
 };
 
 
 template<>
 template<>
-class ExceptionOr<void> : public ExceptionOr<Empty> {
+class [[nodiscard]] ExceptionOr<void> : public ExceptionOr<Empty> {
 public:
 public:
     using ExceptionOr<Empty>::ExceptionOr;
     using ExceptionOr<Empty>::ExceptionOr;
 };
 };