瀏覽代碼

exception: Make what() member function nodiscard

Lioncash 5 年之前
父節點
當前提交
e490ddf327
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/shader_recompiler/exception.h

+ 1 - 1
src/shader_recompiler/exception.h

@@ -17,7 +17,7 @@ class Exception : public std::exception {
 public:
     explicit Exception(std::string message) noexcept : err_message{std::move(message)} {}
 
-    const char* what() const noexcept override {
+    [[nodiscard]] const char* what() const noexcept override {
         return err_message.c_str();
     }