changeset 2016:0ae26237569a

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 13 Jun 2016 15:26:20 +0200
parents bcc575732aef
children 08ce34cfacad
files Core/HttpClient.cpp Core/MultiThreading/BagOfTasks.h Core/MultiThreading/BagOfTasksProcessor.cpp OrthancServer/ParsedDicomFile.cpp
diffstat 4 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Core/HttpClient.cpp	Mon Jun 13 15:07:53 2016 +0200
+++ b/Core/HttpClient.cpp	Mon Jun 13 15:26:20 2016 +0200
@@ -240,7 +240,7 @@
   }
 
 
-  HttpClient::HttpClient() : pimpl_(new PImpl)
+  HttpClient::HttpClient() : pimpl_(new PImpl), verifyPeers_(true)
   {
     Setup();
   }
--- a/Core/MultiThreading/BagOfTasks.h	Mon Jun 13 15:07:53 2016 +0200
+++ b/Core/MultiThreading/BagOfTasks.h	Mon Jun 13 15:26:20 2016 +0200
@@ -49,7 +49,7 @@
   public:
     ~BagOfTasks()
     {
-      for (Tasks::iterator it = tasks_.begin(); it != tasks_.end(); it++)
+      for (Tasks::iterator it = tasks_.begin(); it != tasks_.end(); ++it)
       {
         delete *it;
       }
--- a/Core/MultiThreading/BagOfTasksProcessor.cpp	Mon Jun 13 15:07:53 2016 +0200
+++ b/Core/MultiThreading/BagOfTasksProcessor.cpp	Mon Jun 13 15:26:20 2016 +0200
@@ -198,7 +198,7 @@
     countBags_(0),
     continue_(true)
   {
-    if (countThreads <= 0)
+    if (countThreads == 0)
     {
       throw OrthancException(ErrorCode_ParameterOutOfRange);
     }
--- a/OrthancServer/ParsedDicomFile.cpp	Mon Jun 13 15:07:53 2016 +0200
+++ b/OrthancServer/ParsedDicomFile.cpp	Mon Jun 13 15:26:20 2016 +0200
@@ -1323,6 +1323,7 @@
       case EXS_JPEG2000LosslessOnly:
       case EXS_JPEG2000:
         mime = "image/jp2";
+        break;
 
       default:
         mime = "application/octet-stream";