diff options
| author | bunnei <bunneidev@gmail.com> | 2018-12-27 11:04:05 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-27 11:04:05 -0500 |
| commit | c4515d305b80556fc9b316805a50e2303304a457 (patch) | |
| tree | 9ef68f80306b0bfbd17e84e70c44f3656c057fc5 /src/core/file_sys/vfs.h | |
| parent | 73c9ffc4222e37cfa50a2ef9d2133ba07929bb49 (diff) | |
| parent | c643f364b4c81543782009ce4bb5a87021fe35ed (diff) | |
Merge pull request #1879 from DarkLordZach/am-save-data-size
am: Implement GetSaveDataSize and ExtendSaveData using files
Diffstat (limited to 'src/core/file_sys/vfs.h')
| -rw-r--r-- | src/core/file_sys/vfs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/file_sys/vfs.h b/src/core/file_sys/vfs.h index e5641b255..954094772 100644 --- a/src/core/file_sys/vfs.h +++ b/src/core/file_sys/vfs.h @@ -150,7 +150,7 @@ public: template <typename T> std::size_t WriteArray(const T* data, std::size_t number_elements, std::size_t offset = 0) { static_assert(std::is_trivially_copyable_v<T>, "Data type must be trivially copyable."); - return Write(data, number_elements * sizeof(T), offset); + return Write(reinterpret_cast<const u8*>(data), number_elements * sizeof(T), offset); } // Writes size bytes starting at memory location data to offset in file. @@ -166,7 +166,7 @@ public: template <typename T> std::size_t WriteObject(const T& data, std::size_t offset = 0) { static_assert(std::is_trivially_copyable_v<T>, "Data type must be trivially copyable."); - return Write(&data, sizeof(T), offset); + return Write(reinterpret_cast<const u8*>(&data), sizeof(T), offset); } // Renames the file to name. Returns whether or not the operation was successsful. |
