diff options
| author | 2024-02-19 19:22:51 +0100 | |
|---|---|---|
| committer | 2024-02-19 19:22:51 +0100 | |
| commit | ef5027712413705802d10c797b0f0b66375a9f58 (patch) | |
| tree | 979cf4d365ca5d7f0e63abdd3ecf476f93d4b21b /src/core/file_sys/fsa | |
| parent | Address review comments (diff) | |
| download | yuzu-ef5027712413705802d10c797b0f0b66375a9f58.tar.gz yuzu-ef5027712413705802d10c797b0f0b66375a9f58.tar.xz yuzu-ef5027712413705802d10c797b0f0b66375a9f58.zip | |
Address review comments pt. 2
Diffstat (limited to 'src/core/file_sys/fsa')
| -rw-r--r-- | src/core/file_sys/fsa/fs_i_directory.h | 2 | ||||
| -rw-r--r-- | src/core/file_sys/fsa/fs_i_file.h | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/core/file_sys/fsa/fs_i_directory.h b/src/core/file_sys/fsa/fs_i_directory.h index fc0407d01..c8e895eab 100644 --- a/src/core/file_sys/fsa/fs_i_directory.h +++ b/src/core/file_sys/fsa/fs_i_directory.h | |||
| @@ -56,7 +56,7 @@ private: | |||
| 56 | next_entry_index += actual_entries; | 56 | next_entry_index += actual_entries; |
| 57 | *out_count = actual_entries; | 57 | *out_count = actual_entries; |
| 58 | 58 | ||
| 59 | std::memcpy(out_entries, entries.data(), range_size); | 59 | std::memcpy(out_entries, begin, range_size); |
| 60 | 60 | ||
| 61 | R_SUCCEED(); | 61 | R_SUCCEED(); |
| 62 | } | 62 | } |
diff --git a/src/core/file_sys/fsa/fs_i_file.h b/src/core/file_sys/fsa/fs_i_file.h index 8fdd71c80..1188ae8ca 100644 --- a/src/core/file_sys/fsa/fs_i_file.h +++ b/src/core/file_sys/fsa/fs_i_file.h | |||
| @@ -125,10 +125,8 @@ protected: | |||
| 125 | 125 | ||
| 126 | private: | 126 | private: |
| 127 | Result DoRead(size_t* out, s64 offset, void* buffer, size_t size, const ReadOption& option) { | 127 | Result DoRead(size_t* out, s64 offset, void* buffer, size_t size, const ReadOption& option) { |
| 128 | std::vector<u8> output = backend->ReadBytes(size, offset); | 128 | const auto read_size = backend->Read(static_cast<u8*>(buffer), size, offset); |
| 129 | 129 | *out = read_size; | |
| 130 | *out = output.size(); | ||
| 131 | std::memcpy(buffer, output.data(), size); | ||
| 132 | 130 | ||
| 133 | R_SUCCEED(); | 131 | R_SUCCEED(); |
| 134 | } | 132 | } |