diff OrthancServer/Sources/OrthancGetRequestHandler.cpp @ 4204:318c16cfccab

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 17 Sep 2020 16:18:01 +0200
parents 05b8fd21089c
children c046d559edb3
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancGetRequestHandler.cpp	Thu Sep 17 15:01:31 2020 +0200
+++ b/OrthancServer/Sources/OrthancGetRequestHandler.cpp	Thu Sep 17 16:18:01 2020 +0200
@@ -79,7 +79,7 @@
     std::string dicom;
     context_.ReadDicom(dicom, id);
     
-    if (dicom.size() <= 0)
+    if (dicom.empty())
     {
       return Status_Failure;
     }
@@ -475,9 +475,9 @@
         }
         else
         {
-          for (size_t i = 0; i < tmp.size(); i++)
+          for (size_t j = 0; j < tmp.size(); j++)
           {
-            publicIds.push_back(tmp[i]);
+            publicIds.push_back(tmp[j]);
           }
         }
       }
@@ -488,7 +488,8 @@
 
 
     OrthancGetRequestHandler::OrthancGetRequestHandler(ServerContext& context) :
-      context_(context)
+      context_(context),
+      getCancelled_(false)
     {
       position_ = 0;
       nRemaining_ = 0;