Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

exception: Make what() member function nodiscard

Lioncashb650c38a3153
diff --git a/src/shader_recompiler/exception.h b/src/shader_recompiler/exception.h
index c47aecc1ef..9971697567 100644
--- a/src/shader_recompiler/exception.h
+++ b/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();
}