summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-07-21 03:40:13 +0200
committerLioncash <mathew1800@gmail.com>2018-07-21 03:40:15 +0200
commit05231d8b08f7d473a4c4cf7640227f41de44ac23 (patch)
treeef30c10aa0396ea258da043ceb0949e57b8c8912 /src
parentMerge pull request #743 from lioncash/view (diff)
downloadyuzu-05231d8b08f7d473a4c4cf7640227f41de44ac23.tar
yuzu-05231d8b08f7d473a4c4cf7640227f41de44ac23.tar.gz
yuzu-05231d8b08f7d473a4c4cf7640227f41de44ac23.tar.bz2
yuzu-05231d8b08f7d473a4c4cf7640227f41de44ac23.tar.lz
yuzu-05231d8b08f7d473a4c4cf7640227f41de44ac23.tar.xz
yuzu-05231d8b08f7d473a4c4cf7640227f41de44ac23.tar.zst
yuzu-05231d8b08f7d473a4c4cf7640227f41de44ac23.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/file_sys/vfs.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/file_sys/vfs.h b/src/core/file_sys/vfs.h
index a5213e0cc..edd689c68 100644
--- a/src/core/file_sys/vfs.h
+++ b/src/core/file_sys/vfs.h
@@ -93,7 +93,7 @@ struct VfsFile : NonCopyable {
// Writes an array of type T, size number_elements to offset in file.
// Returns the number of bytes (sizeof(T)*number_elements) written successfully.
template <typename T>
- size_t WriteArray(T* data, size_t number_elements, size_t offset = 0) {
+ size_t WriteArray(const T* data, size_t number_elements, size_t offset = 0) {
static_assert(std::is_trivially_copyable<T>::value,
"Data type must be trivially copyable.");
@@ -103,10 +103,10 @@ struct VfsFile : NonCopyable {
// Writes size bytes starting at memory location data to offset in file.
// Returns the number of bytes written successfully.
template <typename T>
- size_t WriteBytes(T* data, size_t size, size_t offset = 0) {
+ size_t WriteBytes(const T* data, size_t size, size_t offset = 0) {
static_assert(std::is_trivially_copyable<T>::value,
"Data type must be trivially copyable.");
- return Write(reinterpret_cast<u8*>(data), size, offset);
+ return Write(reinterpret_cast<const u8*>(data), size, offset);
}
// Writes one object of type T to offset in file.