summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2016-04-14 01:38:01 +0200
committerLioncash <mathew1800@gmail.com>2016-04-14 02:17:23 +0200
commit655623ebb2dd6f3f1451e5b8b92dc755868347c8 (patch)
tree3414e5072c23e063e743d57e8b0e6b42c742914d /src/common
parentfile_util: Don't expose IOFile internals through the API (diff)
downloadyuzu-655623ebb2dd6f3f1451e5b8b92dc755868347c8.tar
yuzu-655623ebb2dd6f3f1451e5b8b92dc755868347c8.tar.gz
yuzu-655623ebb2dd6f3f1451e5b8b92dc755868347c8.tar.bz2
yuzu-655623ebb2dd6f3f1451e5b8b92dc755868347c8.tar.lz
yuzu-655623ebb2dd6f3f1451e5b8b92dc755868347c8.tar.xz
yuzu-655623ebb2dd6f3f1451e5b8b92dc755868347c8.tar.zst
yuzu-655623ebb2dd6f3f1451e5b8b92dc755868347c8.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/file_util.cpp12
-rw-r--r--src/common/file_util.h4
2 files changed, 8 insertions, 8 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index 578c673b9..7d96d04d9 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -930,12 +930,12 @@ bool IOFile::Close()
return m_good;
}
-u64 IOFile::GetSize()
+u64 IOFile::GetSize() const
{
if (IsOpen())
return FileUtil::GetSize(m_file);
- else
- return 0;
+
+ return 0;
}
bool IOFile::Seek(s64 off, int origin)
@@ -946,12 +946,12 @@ bool IOFile::Seek(s64 off, int origin)
return m_good;
}
-u64 IOFile::Tell()
+u64 IOFile::Tell() const
{
if (IsOpen())
return ftello(m_file);
- else
- return -1;
+
+ return -1;
}
bool IOFile::Flush()
diff --git a/src/common/file_util.h b/src/common/file_util.h
index 8f72fb4e2..d520130ce 100644
--- a/src/common/file_util.h
+++ b/src/common/file_util.h
@@ -247,8 +247,8 @@ public:
explicit operator bool() const { return IsGood(); }
bool Seek(s64 off, int origin);
- u64 Tell();
- u64 GetSize();
+ u64 Tell() const;
+ u64 GetSize() const;
bool Resize(u64 size);
bool Flush();