comparison Core/SystemToolbox.cpp @ 2332:9ccd7f926c5b

fix warnings in visual studio
author jodogne
date Sat, 15 Jul 2017 10:59:42 +0200
parents a3a65de1840f
children ae50eccd41b7
comparison
equal deleted inserted replaced
2331:a47d07b5b39f 2332:9ccd7f926c5b
191 { 191 {
192 throw OrthancException(ErrorCode_InexistentFile); 192 throw OrthancException(ErrorCode_InexistentFile);
193 } 193 }
194 194
195 std::streamsize size = GetStreamSize(f); 195 std::streamsize size = GetStreamSize(f);
196 content.resize(size); 196 content.resize(static_cast<size_t>(size));
197 if (size != 0) 197 if (size != 0)
198 { 198 {
199 f.read(reinterpret_cast<char*>(&content[0]), size); 199 f.read(reinterpret_cast<char*>(&content[0]), size);
200 } 200 }
201 201
229 headerSize = 0; 229 headerSize = 0;
230 full = false; 230 full = false;
231 } 231 }
232 else if (static_cast<size_t>(size) < headerSize) 232 else if (static_cast<size_t>(size) < headerSize)
233 { 233 {
234 headerSize = size; // Truncate to the size of the file 234 headerSize = static_cast<size_t>(size); // Truncate to the size of the file
235 full = false; 235 full = false;
236 } 236 }
237 } 237 }
238 238
239 header.resize(headerSize); 239 header.resize(headerSize);