changeset 2332:9ccd7f926c5b

fix warnings in visual studio
author jodogne
date Sat, 15 Jul 2017 10:59:42 +0200
parents a47d07b5b39f
children 6677cdbfbafd
files Core/HttpServer/FilesystemHttpSender.cpp Core/SystemToolbox.cpp
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Core/HttpServer/FilesystemHttpSender.cpp	Fri Jul 14 17:29:18 2017 +0200
+++ b/Core/HttpServer/FilesystemHttpSender.cpp	Sat Jul 15 10:59:42 2017 +0200
@@ -70,7 +70,7 @@
       throw OrthancException(ErrorCode_CorruptedFile);
     }
 
-    chunkSize_ = file_.gcount();
+    chunkSize_ = static_cast<size_t>(file_.gcount());
 
     return chunkSize_ > 0;
   }
--- a/Core/SystemToolbox.cpp	Fri Jul 14 17:29:18 2017 +0200
+++ b/Core/SystemToolbox.cpp	Sat Jul 15 10:59:42 2017 +0200
@@ -193,7 +193,7 @@
     }
 
     std::streamsize size = GetStreamSize(f);
-    content.resize(size);
+    content.resize(static_cast<size_t>(size));
     if (size != 0)
     {
       f.read(reinterpret_cast<char*>(&content[0]), size);
@@ -231,7 +231,7 @@
       }
       else if (static_cast<size_t>(size) < headerSize)
       {
-        headerSize = size;  // Truncate to the size of the file
+        headerSize = static_cast<size_t>(size);  // Truncate to the size of the file
         full = false;
       }
     }