From 26547d3e3be403047445fd39e671d7ef3b88dabb Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 29 Oct 2020 23:30:42 -0400 Subject: General: Make ignoring a discarded return value an error Allows our CI to catch more potential bugs. This also removes the [[nodiscard]] attribute of IOFile's Open member function. There are cases where a file may want to be opened, but have the status of it checked at a later time. --- src/common/file_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/file_util.h') diff --git a/src/common/file_util.h b/src/common/file_util.h index 8b587320f..840cde2a6 100644 --- a/src/common/file_util.h +++ b/src/common/file_util.h @@ -232,7 +232,7 @@ public: void Swap(IOFile& other) noexcept; - [[nodiscard]] bool Open(const std::string& filename, const char openmode[], int flags = 0); + bool Open(const std::string& filename, const char openmode[], int flags = 0); bool Close(); template -- cgit v1.2.3