IOFile: Make origin parameter to Seek() an enum class.

This commit is contained in:
Admiral H. Curtiss 2022-01-29 05:58:31 +01:00
commit 36cfcb530f
No known key found for this signature in database
GPG key ID: F051B4C4044F33FB
26 changed files with 116 additions and 78 deletions

View file

@ -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);