diff options
| author | 2018-07-27 23:55:23 -0400 | |
|---|---|---|
| committer | 2018-08-01 00:16:54 -0400 | |
| commit | df5b75694f5abde94ccf05fa6c7a557b1ba9079b (patch) | |
| tree | 70f0cf96b1a9834360fb1c5d5547939693ecd577 /src/core/file_sys/vfs.cpp | |
| parent | Merge pull request #871 from bunnei/audio-config (diff) | |
| download | yuzu-df5b75694f5abde94ccf05fa6c7a557b1ba9079b.tar.gz yuzu-df5b75694f5abde94ccf05fa6c7a557b1ba9079b.tar.xz yuzu-df5b75694f5abde94ccf05fa6c7a557b1ba9079b.zip | |
Remove files that are not used
Diffstat (limited to 'src/core/file_sys/vfs.cpp')
| -rw-r--r-- | src/core/file_sys/vfs.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/core/file_sys/vfs.cpp b/src/core/file_sys/vfs.cpp index 84a6a7397..57d0aeb85 100644 --- a/src/core/file_sys/vfs.cpp +++ b/src/core/file_sys/vfs.cpp | |||
| @@ -285,6 +285,27 @@ bool ReadOnlyVfsDirectory::Rename(std::string_view name) { | |||
| 285 | return false; | 285 | return false; |
| 286 | } | 286 | } |
| 287 | 287 | ||
| 288 | bool DeepEquals(const VirtualFile& file1, const VirtualFile& file2, size_t block_size) { | ||
| 289 | if (file1->GetSize() != file2->GetSize()) | ||
| 290 | return false; | ||
| 291 | |||
| 292 | std::vector<u8> f1_v(block_size); | ||
| 293 | std::vector<u8> f2_v(block_size); | ||
| 294 | for (size_t i = 0; i < file1->GetSize(); i += block_size) { | ||
| 295 | auto f1_vs = file1->Read(f1_v.data(), block_size, i); | ||
| 296 | auto f2_vs = file2->Read(f2_v.data(), block_size, i); | ||
| 297 | |||
| 298 | if (f1_vs != f2_vs) | ||
| 299 | return false; | ||
| 300 | for (size_t j = 0; j < f1_vs; ++j) { | ||
| 301 | if (f1_v[j] != f2_v[j]) | ||
| 302 | return false; | ||
| 303 | } | ||
| 304 | } | ||
| 305 | |||
| 306 | return true; | ||
| 307 | } | ||
| 308 | |||
| 288 | bool VfsRawCopy(VirtualFile src, VirtualFile dest) { | 309 | bool VfsRawCopy(VirtualFile src, VirtualFile dest) { |
| 289 | if (src == nullptr || dest == nullptr) | 310 | if (src == nullptr || dest == nullptr) |
| 290 | return false; | 311 | return false; |