# HG changeset patch # User Sebastien Jodogne # Date 1482434314 -3600 # Node ID 8fd5bf76bb8ea010dfb25ad77d2e9d5403fcdffa # Parent bdc5cb0db9bfa9d5d490e365b349e142c54f41f9 cppcheck diff -r bdc5cb0db9bf -r 8fd5bf76bb8e Framework/DicomizerParameters.cpp --- a/Framework/DicomizerParameters.cpp Thu Dec 22 09:03:36 2016 +0100 +++ b/Framework/DicomizerParameters.cpp Thu Dec 22 20:18:34 2016 +0100 @@ -53,24 +53,26 @@ } - DicomizerParameters::DicomizerParameters() + DicomizerParameters::DicomizerParameters() : + safetyCheck_(false), + repaintBackground_(false), + targetCompression_(ImageCompression_Jpeg), + hasTargetTileSize_(false), + targetTileWidth_(512), + targetTileHeight_(512), + maxDicomFileSize_(10 * 1024 * 1024), // 10MB + reconstructPyramid_(false), + pyramidLevelsCount_(0), + pyramidLowerLevelsCount_(0), + smooth_(false), + jpegQuality_(90), + forceReencode_(false), + opticalPath_(OpticalPath_Brightfield) { - safetyCheck_ = false; - repaintBackground_ = false; backgroundColor_[0] = 255; backgroundColor_[1] = 255; backgroundColor_[2] = 255; - targetCompression_ = ImageCompression_Jpeg; - hasTargetTileSize_ = false; threadsCount_ = ChooseNumberOfThreads(); - maxDicomFileSize_ = 10 * 1024 * 1024; // 10MB - reconstructPyramid_ = false; - pyramidLevelsCount_ = 0; - pyramidLowerLevelsCount_ = 0; - smooth_ = false; - jpegQuality_ = 90; - forceReencode_ = false; - opticalPath_ = OpticalPath_Brightfield; } @@ -146,7 +148,7 @@ void DicomizerParameters::SetPyramidLevelsCount(unsigned int count) { - if (count <= 0) + if (count == 0) { throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); } @@ -195,7 +197,7 @@ void DicomizerParameters::SetPyramidLowerLevelsCount(unsigned int count) { - if (count <= 0) + if (count == 0) { throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); } diff -r bdc5cb0db9bf -r 8fd5bf76bb8e Framework/Targets/FolderTarget.h --- a/Framework/Targets/FolderTarget.h Thu Dec 22 09:03:36 2016 +0100 +++ b/Framework/Targets/FolderTarget.h Thu Dec 22 20:18:34 2016 +0100 @@ -34,7 +34,7 @@ std::string pattern_; public: - FolderTarget(const std::string& pattern) : + explicit FolderTarget(const std::string& pattern) : count_(0), pattern_(pattern) { diff -r bdc5cb0db9bf -r 8fd5bf76bb8e Framework/Targets/OrthancTarget.h --- a/Framework/Targets/OrthancTarget.h Thu Dec 22 09:03:36 2016 +0100 +++ b/Framework/Targets/OrthancTarget.h Thu Dec 22 20:18:34 2016 +0100 @@ -35,9 +35,9 @@ bool first_; public: - OrthancTarget(const Orthanc::WebServiceParameters& parameters); + explicit OrthancTarget(const Orthanc::WebServiceParameters& parameters); - OrthancTarget(OrthancPlugins::IOrthancConnection* orthanc) : // Takes ownership + explicit OrthancTarget(OrthancPlugins::IOrthancConnection* orthanc) : // Takes ownership orthanc_(orthanc), first_(true) {