comparison 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
comparison
equal deleted inserted replaced
4203:4d42408da117 4204:318c16cfccab
77 const std::string& id = instances_[position_++]; 77 const std::string& id = instances_[position_++];
78 78
79 std::string dicom; 79 std::string dicom;
80 context_.ReadDicom(dicom, id); 80 context_.ReadDicom(dicom, id);
81 81
82 if (dicom.size() <= 0) 82 if (dicom.empty())
83 { 83 {
84 return Status_Failure; 84 return Status_Failure;
85 } 85 }
86 86
87 std::unique_ptr<DcmFileFormat> parsed( 87 std::unique_ptr<DcmFileFormat> parsed(
473 << "\" at the " << EnumerationToString(level) << " level"; 473 << "\" at the " << EnumerationToString(level) << " level";
474 return false; 474 return false;
475 } 475 }
476 else 476 else
477 { 477 {
478 for (size_t i = 0; i < tmp.size(); i++) 478 for (size_t j = 0; j < tmp.size(); j++)
479 { 479 {
480 publicIds.push_back(tmp[i]); 480 publicIds.push_back(tmp[j]);
481 } 481 }
482 } 482 }
483 } 483 }
484 484
485 return true; 485 return true;
486 } 486 }
487 } 487 }
488 488
489 489
490 OrthancGetRequestHandler::OrthancGetRequestHandler(ServerContext& context) : 490 OrthancGetRequestHandler::OrthancGetRequestHandler(ServerContext& context) :
491 context_(context) 491 context_(context),
492 getCancelled_(false)
492 { 493 {
493 position_ = 0; 494 position_ = 0;
494 nRemaining_ = 0; 495 nRemaining_ = 0;
495 nCompleted_ = 0; 496 nCompleted_ = 0;
496 warningCount_ = 0; 497 warningCount_ = 0;