summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2018-09-25 18:10:47 -0400
committerGravatar Lioncash2018-09-25 20:06:21 -0400
commitfa9e0f9c8bf3c14e424d386ec85019e9498f7f12 (patch)
treec6c7025e045448628557a4025e7bfa508b0450f6 /src
parentyuzu/main: Resolve precedence bug within CalculateRomFSEntrySize() (diff)
downloadyuzu-fa9e0f9c8bf3c14e424d386ec85019e9498f7f12.tar.gz
yuzu-fa9e0f9c8bf3c14e424d386ec85019e9498f7f12.tar.xz
yuzu-fa9e0f9c8bf3c14e424d386ec85019e9498f7f12.zip
fsmitm_romfsbuild: Make auto variable into a std::size_t variable within Build()
auto x = 0; auto-deduces x to be an int. This is undesirable when working with unsigned values. It also causes sign conversion warnings. Instead, we can make it a proper unsigned value with the correct width that the following expressions operate on.
Diffstat (limited to 'src')
-rw-r--r--src/core/file_sys/fsmitm_romfsbuild.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/file_sys/fsmitm_romfsbuild.cpp b/src/core/file_sys/fsmitm_romfsbuild.cpp
index 16172445a..a8af5e14f 100644
--- a/src/core/file_sys/fsmitm_romfsbuild.cpp
+++ b/src/core/file_sys/fsmitm_romfsbuild.cpp
@@ -355,7 +355,7 @@ std::map<u64, VirtualFile> RomFSBuildContext::Build() {
355 355
356 std::vector<u8> metadata(file_hash_table_size + file_table_size + dir_hash_table_size + 356 std::vector<u8> metadata(file_hash_table_size + file_table_size + dir_hash_table_size +
357 dir_table_size); 357 dir_table_size);
358 auto index = 0; 358 std::size_t index = 0;
359 std::memcpy(metadata.data(), dir_hash_table.data(), dir_hash_table.size() * sizeof(u32)); 359 std::memcpy(metadata.data(), dir_hash_table.data(), dir_hash_table.size() * sizeof(u32));
360 index += dir_hash_table.size() * sizeof(u32); 360 index += dir_hash_table.size() * sizeof(u32);
361 std::memcpy(metadata.data() + index, dir_table.data(), dir_table.size()); 361 std::memcpy(metadata.data() + index, dir_table.data(), dir_table.size());