comparison 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
comparison
equal deleted inserted replaced
4199:fbc49a65340a 4200:7112a8af0b63
62 } 62 }
63 } 63 }
64 64
65 65
66 public: 66 public:
67 RelationshipsVisitor(DicomModification& that) : 67 explicit RelationshipsVisitor(DicomModification& that) :
68 that_(that) 68 that_(that)
69 { 69 {
70 } 70 }
71 71
72 virtual void VisitNotSupported(const std::vector<DicomTag>& parentTags, 72 virtual void VisitNotSupported(const std::vector<DicomTag>& parentTags,
73 const std::vector<size_t>& parentIndexes, 73 const std::vector<size_t>& parentIndexes,
1399 mapSeries = Json::objectValue; 1399 mapSeries = Json::objectValue;
1400 mapInstances = Json::objectValue; 1400 mapInstances = Json::objectValue;
1401 1401
1402 for (UidMap::const_iterator it = uidMap_.begin(); it != uidMap_.end(); ++it) 1402 for (UidMap::const_iterator it = uidMap_.begin(); it != uidMap_.end(); ++it)
1403 { 1403 {
1404 Json::Value* tmp = NULL; 1404 Json::Value* tmp2 = NULL;
1405 1405
1406 switch (it->first.first) 1406 switch (it->first.first)
1407 { 1407 {
1408 case ResourceType_Patient: 1408 case ResourceType_Patient:
1409 tmp = &mapPatients; 1409 tmp2 = &mapPatients;
1410 break; 1410 break;
1411 1411
1412 case ResourceType_Study: 1412 case ResourceType_Study:
1413 tmp = &mapStudies; 1413 tmp2 = &mapStudies;
1414 break; 1414 break;
1415 1415
1416 case ResourceType_Series: 1416 case ResourceType_Series:
1417 tmp = &mapSeries; 1417 tmp2 = &mapSeries;
1418 break; 1418 break;
1419 1419
1420 case ResourceType_Instance: 1420 case ResourceType_Instance:
1421 tmp = &mapInstances; 1421 tmp2 = &mapInstances;
1422 break; 1422 break;
1423 1423
1424 default: 1424 default:
1425 throw OrthancException(ErrorCode_InternalError); 1425 throw OrthancException(ErrorCode_InternalError);
1426 } 1426 }
1427 1427
1428 assert(tmp != NULL); 1428 assert(tmp2 != NULL);
1429 (*tmp) [it->first.second] = it->second; 1429 (*tmp2) [it->first.second] = it->second;
1430 } 1430 }
1431 } 1431 }
1432 1432
1433 1433
1434 void DicomModification::UnserializeUidMap(ResourceType level, 1434 void DicomModification::UnserializeUidMap(ResourceType level,