summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/patch_manager.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-09-15 01:19:56 +0200
committerLioncash <mathew1800@gmail.com>2020-09-15 01:19:59 +0200
commit33e4a0b6c180a5e866e3a45b42e9749506485558 (patch)
tree94cb81437733d78d17dab14902a0e5db7fe62e2c /src/core/file_sys/patch_manager.cpp
parentpatch_manager: Make use of type aliases (diff)
downloadyuzu-33e4a0b6c180a5e866e3a45b42e9749506485558.tar
yuzu-33e4a0b6c180a5e866e3a45b42e9749506485558.tar.gz
yuzu-33e4a0b6c180a5e866e3a45b42e9749506485558.tar.bz2
yuzu-33e4a0b6c180a5e866e3a45b42e9749506485558.tar.lz
yuzu-33e4a0b6c180a5e866e3a45b42e9749506485558.tar.xz
yuzu-33e4a0b6c180a5e866e3a45b42e9749506485558.tar.zst
yuzu-33e4a0b6c180a5e866e3a45b42e9749506485558.zip
Diffstat (limited to 'src/core/file_sys/patch_manager.cpp')
-rw-r--r--src/core/file_sys/patch_manager.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp
index 2b7bd2832..87c354a43 100644
--- a/src/core/file_sys/patch_manager.cpp
+++ b/src/core/file_sys/patch_manager.cpp
@@ -45,14 +45,15 @@ enum class TitleVersionFormat : u8 {
std::string FormatTitleVersion(u32 version,
TitleVersionFormat format = TitleVersionFormat::ThreeElements) {
std::array<u8, sizeof(u32)> bytes{};
- bytes[0] = version % SINGLE_BYTE_MODULUS;
+ bytes[0] = static_cast<u8>(version % SINGLE_BYTE_MODULUS);
for (std::size_t i = 1; i < bytes.size(); ++i) {
version /= SINGLE_BYTE_MODULUS;
- bytes[i] = version % SINGLE_BYTE_MODULUS;
+ bytes[i] = static_cast<u8>(version % SINGLE_BYTE_MODULUS);
}
- if (format == TitleVersionFormat::FourElements)
+ if (format == TitleVersionFormat::FourElements) {
return fmt::format("v{}.{}.{}.{}", bytes[3], bytes[2], bytes[1], bytes[0]);
+ }
return fmt::format("v{}.{}.{}", bytes[3], bytes[2], bytes[1]);
}