Mercurial > hg > orthanc
comparison Core/Compression/ZlibCompressor.cpp @ 1545:33d34bc4ac15
fix msvc warnings
author | jodogne |
---|---|
date | Thu, 13 Aug 2015 21:02:31 +0200 |
parents | fe07f82d83d3 |
children | bd1889029cbb |
comparison
equal
deleted
inserted
replaced
1544:4d0e2c38d15b | 1545:33d34bc4ac15 |
---|---|
122 | 122 |
123 uint64_t uncompressedSize = ReadUncompressedSizePrefix(compressed, compressedSize); | 123 uint64_t uncompressedSize = ReadUncompressedSizePrefix(compressed, compressedSize); |
124 | 124 |
125 try | 125 try |
126 { | 126 { |
127 uncompressed.resize(uncompressedSize); | 127 uncompressed.resize(static_cast<size_t>(uncompressedSize)); |
128 } | 128 } |
129 catch (...) | 129 catch (...) |
130 { | 130 { |
131 throw OrthancException(ErrorCode_NotEnoughMemory); | 131 throw OrthancException(ErrorCode_NotEnoughMemory); |
132 } | 132 } |
133 | 133 |
134 uLongf tmp = uncompressedSize; | 134 uLongf tmp = static_cast<uLongf>(uncompressedSize); |
135 int error = uncompress | 135 int error = uncompress |
136 (reinterpret_cast<uint8_t*>(&uncompressed[0]), | 136 (reinterpret_cast<uint8_t*>(&uncompressed[0]), |
137 &tmp, | 137 &tmp, |
138 reinterpret_cast<const uint8_t*>(compressed) + sizeof(uint64_t), | 138 reinterpret_cast<const uint8_t*>(compressed) + sizeof(uint64_t), |
139 compressedSize - sizeof(uint64_t)); | 139 compressedSize - sizeof(uint64_t)); |