diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-04-28 20:06:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-04-28 23:02:16 +0300 |
commit | 15919532c723ca0186b0c0c932cd1b90c7d2e570 (patch) | |
tree | 249673c7f5f06b2741826e12d7f69a9de379a52d /src/fs/virtfs/virtfszip.cpp | |
parent | 515323530ba1b93c8d5ba00b015bf55aa0ecb01c (diff) | |
download | plus-15919532c723ca0186b0c0c932cd1b90c7d2e570.tar.gz plus-15919532c723ca0186b0c0c932cd1b90c7d2e570.tar.bz2 plus-15919532c723ca0186b0c0c932cd1b90c7d2e570.tar.xz plus-15919532c723ca0186b0c0c932cd1b90c7d2e570.zip |
Fix code style.
Diffstat (limited to 'src/fs/virtfs/virtfszip.cpp')
-rw-r--r-- | src/fs/virtfs/virtfszip.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fs/virtfs/virtfszip.cpp b/src/fs/virtfs/virtfszip.cpp index 76ee69093..7d2f0e8b6 100644 --- a/src/fs/virtfs/virtfszip.cpp +++ b/src/fs/virtfs/virtfszip.cpp @@ -565,15 +565,15 @@ namespace VirtFsZip reportAlways("VirtFsZip::read buffer is null"); return 0; } - const uint32_t pos = CAST_S32(file->mPos); - const uint32_t sz = CAST_S32(file->mSize); + const size_t pos = file->mPos; + const size_t sz = file->mSize; // if outside of buffer, return if (pos >= sz) return 0; // pointer to start for buffer ready to read const uint8_t *restrict const memPtr = file->mBuf + pos; // left buffer size from pos to end - const uint32_t memSize = sz - pos; + const uint32_t memSize = CAST_U32(sz - pos); // number of objects possible to read uint32_t memCount = memSize / objSize; if (memCount == 0) @@ -582,7 +582,7 @@ namespace VirtFsZip if (memCount > objCount) memCount = objCount; // number of bytes to read from buffer - const uint32_t memEnd = memCount * objSize; + const size_t memEnd = memCount * objSize; memcpy(buffer, memPtr, memEnd); file->mPos += memEnd; return memCount; |