comparison OrthancServer/Plugins/Samples/MultitenantDicom/MoveRequestHandler.cpp @ 5280:49477780e25a

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 15 Apr 2023 13:07:47 +0200
parents 7cb1b851f5c8
children a8385880902f
comparison
equal deleted inserted replaced
5279:b9456dfde58a 5280:49477780e25a
45 body_(body), 45 body_(body),
46 done_(false) 46 done_(false)
47 { 47 {
48 } 48 }
49 49
50 unsigned int GetSubOperationCount() const 50 virtual unsigned int GetSubOperationCount() const ORTHANC_OVERRIDE
51 { 51 {
52 return 1; 52 return 1;
53 } 53 }
54 54
55 Status DoNext() 55 virtual Status DoNext() ORTHANC_OVERRIDE
56 { 56 {
57 Json::Value answer; 57 Json::Value answer;
58 58
59 if (done_) 59 if (done_)
60 { 60 {
93 93
94 Json::Value response; 94 Json::Value response;
95 if (OrthancPlugins::RestApiPost(response, "/tools/find", request, false) && 95 if (OrthancPlugins::RestApiPost(response, "/tools/find", request, false) &&
96 response.type() == Json::arrayValue) 96 response.type() == Json::arrayValue)
97 { 97 {
98 for (Json::Value::ArrayIndex i = 0; i < response.size(); i++) 98 for (Json::Value::ArrayIndex j = 0; j < response.size(); j++)
99 { 99 {
100 if (response[i].type() != Json::stringValue) 100 if (response[j].type() != Json::stringValue)
101 { 101 {
102 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); 102 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError);
103 } 103 }
104 else 104 else
105 { 105 {
106 publicIds.insert(response[i].asString()); 106 publicIds.insert(response[j].asString());
107 } 107 }
108 } 108 }
109 } 109 }
110 else 110 else
111 { 111 {