Skip to content
Snippets Groups Projects
Commit 655623eb authored by Lioncash's avatar Lioncash
Browse files

file_util: const qualify IOFile's Tell and GetSize functions

parent a4120ca6
No related branches found
No related tags found
No related merge requests found
...@@ -930,12 +930,12 @@ bool IOFile::Close() ...@@ -930,12 +930,12 @@ bool IOFile::Close()
return m_good; return m_good;
} }
u64 IOFile::GetSize() u64 IOFile::GetSize() const
{ {
if (IsOpen()) if (IsOpen())
return FileUtil::GetSize(m_file); return FileUtil::GetSize(m_file);
else
return 0; return 0;
} }
bool IOFile::Seek(s64 off, int origin) bool IOFile::Seek(s64 off, int origin)
...@@ -946,12 +946,12 @@ bool IOFile::Seek(s64 off, int origin) ...@@ -946,12 +946,12 @@ bool IOFile::Seek(s64 off, int origin)
return m_good; return m_good;
} }
u64 IOFile::Tell() u64 IOFile::Tell() const
{ {
if (IsOpen()) if (IsOpen())
return ftello(m_file); return ftello(m_file);
else
return -1; return -1;
} }
bool IOFile::Flush() bool IOFile::Flush()
......
...@@ -247,8 +247,8 @@ public: ...@@ -247,8 +247,8 @@ public:
explicit operator bool() const { return IsGood(); } explicit operator bool() const { return IsGood(); }
bool Seek(s64 off, int origin); bool Seek(s64 off, int origin);
u64 Tell(); u64 Tell() const;
u64 GetSize(); u64 GetSize() const;
bool Resize(u64 size); bool Resize(u64 size);
bool Flush(); bool Flush();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment