Explorar el Código

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

Linus Groh hace 2 años
padre
commit
a80da456a5
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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>
-class ExceptionOr {
+class [[nodiscard]] ExceptionOr {
 public:
     ExceptionOr() requires(IsSame<ValueType, Empty>)
         : m_result(Empty {})
@@ -119,7 +119,7 @@ private:
 };
 
 template<>
-class ExceptionOr<void> : public ExceptionOr<Empty> {
+class [[nodiscard]] ExceptionOr<void> : public ExceptionOr<Empty> {
 public:
     using ExceptionOr<Empty>::ExceptionOr;
 };