diff options
| author | bunnei <bunneidev@gmail.com> | 2018-09-17 09:51:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-17 09:51:47 -0400 |
| commit | 076add4ccddff3940e20fc320615e3d330f77119 (patch) | |
| tree | bacabcfed8665974c276489509a1caa330ad36a2 /src/core/crypto/xts_encryption_layer.cpp | |
| parent | 3be048e50a2090caf1eeeb2373c7524ecc177ce8 (diff) | |
| parent | 63c2e32e207d31ecadd9022e1d7cd705c9febac8 (diff) | |
Merge pull request #1326 from FearlessTobi/port-4182
Port #4182 from Citra: "Prefix all size_t with std::"
Diffstat (limited to 'src/core/crypto/xts_encryption_layer.cpp')
| -rw-r--r-- | src/core/crypto/xts_encryption_layer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/crypto/xts_encryption_layer.cpp b/src/core/crypto/xts_encryption_layer.cpp index c10832cfe..8f0ba4ee7 100644 --- a/src/core/crypto/xts_encryption_layer.cpp +++ b/src/core/crypto/xts_encryption_layer.cpp @@ -14,7 +14,7 @@ constexpr u64 XTS_SECTOR_SIZE = 0x4000; XTSEncryptionLayer::XTSEncryptionLayer(FileSys::VirtualFile base_, Key256 key_) : EncryptionLayer(std::move(base_)), cipher(key_, Mode::XTS) {} -size_t XTSEncryptionLayer::Read(u8* data, size_t length, size_t offset) const { +std::size_t XTSEncryptionLayer::Read(u8* data, std::size_t length, std::size_t offset) const { if (length == 0) return 0; @@ -46,7 +46,7 @@ size_t XTSEncryptionLayer::Read(u8* data, size_t length, size_t offset) const { block.resize(XTS_SECTOR_SIZE); cipher.XTSTranscode(block.data(), block.size(), block.data(), (offset - sector_offset) / XTS_SECTOR_SIZE, XTS_SECTOR_SIZE, Op::Decrypt); - const size_t read = XTS_SECTOR_SIZE - sector_offset; + const std::size_t read = XTS_SECTOR_SIZE - sector_offset; if (length + sector_offset < XTS_SECTOR_SIZE) { std::memcpy(data, block.data() + sector_offset, std::min<u64>(length, read)); |
