diff OrthancFramework/Sources/DicomParsing/DicomModification.cpp @ 4200:7112a8af0b63

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 16 Sep 2020 20:53:31 +0200
parents a4f28efdfccf
children 0ae2ca210077
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomParsing/DicomModification.cpp	Wed Sep 16 20:28:20 2020 +0200
+++ b/OrthancFramework/Sources/DicomParsing/DicomModification.cpp	Wed Sep 16 20:53:31 2020 +0200
@@ -64,8 +64,8 @@
                          
 
   public:
-    RelationshipsVisitor(DicomModification&  that) :
-    that_(that)
+    explicit RelationshipsVisitor(DicomModification& that) :
+      that_(that)
     {
     }
 
@@ -1401,32 +1401,32 @@
 
     for (UidMap::const_iterator it = uidMap_.begin(); it != uidMap_.end(); ++it)
     {
-      Json::Value* tmp = NULL;
+      Json::Value* tmp2 = NULL;
 
       switch (it->first.first)
       {
         case ResourceType_Patient:
-          tmp = &mapPatients;
+          tmp2 = &mapPatients;
           break;
 
         case ResourceType_Study:
-          tmp = &mapStudies;
+          tmp2 = &mapStudies;
           break;
 
         case ResourceType_Series:
-          tmp = &mapSeries;
+          tmp2 = &mapSeries;
           break;
 
         case ResourceType_Instance:
-          tmp = &mapInstances;
+          tmp2 = &mapInstances;
           break;
 
         default:
           throw OrthancException(ErrorCode_InternalError);
       }
 
-      assert(tmp != NULL);
-      (*tmp) [it->first.second] = it->second;
+      assert(tmp2 != NULL);
+      (*tmp2) [it->first.second] = it->second;
     }
   }