From 36cfcb530f6810afca93e75c47f767a453a99361 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Sat, 29 Jan 2022 05:58:31 +0100 Subject: IOFile: Make origin parameter to Seek() an enum class. --- Source/Core/Common/IOFile.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Source/Core/Common/IOFile.h') diff --git a/Source/Core/Common/IOFile.h b/Source/Core/Common/IOFile.h index 873c4c2af5..21c2ff6fcf 100644 --- a/Source/Core/Common/IOFile.h +++ b/Source/Core/Common/IOFile.h @@ -13,6 +13,13 @@ namespace File { +enum class SeekOrigin +{ + Begin, + Current, + End, +}; + // simple wrapper for cstdlib file functions to // hopefully will make error checking easier // and make forgetting an fclose() harder @@ -89,7 +96,7 @@ public: std::FILE* GetHandle() { return m_file; } void SetHandle(std::FILE* file); - bool Seek(s64 off, int origin); + bool Seek(s64 offset, SeekOrigin origin); u64 Tell() const; u64 GetSize() const; bool Resize(u64 size); -- cgit v1.2.3 From a336c4386c154746ef2ea732b13872f5293666be Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Sat, 29 Jan 2022 06:01:03 +0100 Subject: IOFile: Rename Clear() to ClearError() for clarity. --- Source/Core/Common/IOFile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/Common/IOFile.h') diff --git a/Source/Core/Common/IOFile.h b/Source/Core/Common/IOFile.h index 21c2ff6fcf..0c14fad838 100644 --- a/Source/Core/Common/IOFile.h +++ b/Source/Core/Common/IOFile.h @@ -103,7 +103,7 @@ public: bool Flush(); // clear error state - void Clear() + void ClearError() { m_good = true; std::clearerr(m_file); -- cgit v1.2.3