Mercurial > hg > orthanc-wsi
changeset 145:0b7e7be7d655
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 23 Apr 2018 16:21:58 +0200 |
parents | 95832e6c4368 |
children | 213d35bc1881 65db094d20e4 |
files | Applications/Dicomizer.cpp Framework/Inputs/DicomPyramidLevel.h Framework/Inputs/HierarchicalTiff.h Framework/Inputs/OpenSlideLibrary.h Framework/Inputs/TiledPyramidStatistics.h Framework/Jpeg2000Reader.cpp Framework/Jpeg2000Writer.cpp Framework/Outputs/HierarchicalTiffWriter.cpp ViewerPlugin/Plugin.cpp |
diffstat | 9 files changed, 13 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/Applications/Dicomizer.cpp Fri Apr 20 14:23:54 2018 +0200 +++ b/Applications/Dicomizer.cpp Mon Apr 23 16:21:58 2018 +0200 @@ -723,7 +723,7 @@ w = options[OPTION_TILE_WIDTH].as<int>(); } - unsigned int h = 0; + int h = 0; if (options.count(OPTION_TILE_HEIGHT)) { h = options[OPTION_TILE_HEIGHT].as<int>();
--- a/Framework/Inputs/DicomPyramidLevel.h Fri Apr 20 14:23:54 2018 +0200 +++ b/Framework/Inputs/DicomPyramidLevel.h Mon Apr 23 16:21:58 2018 +0200 @@ -61,7 +61,7 @@ unsigned int tileY) const; public: - DicomPyramidLevel(DicomPyramidInstance& instance); + explicit DicomPyramidLevel(DicomPyramidInstance& instance); void AddInstance(DicomPyramidInstance& instance);
--- a/Framework/Inputs/HierarchicalTiff.h Fri Apr 20 14:23:54 2018 +0200 +++ b/Framework/Inputs/HierarchicalTiff.h Mon Apr 23 16:21:58 2018 +0200 @@ -68,7 +68,7 @@ bool Initialize(); public: - HierarchicalTiff(const std::string& path); + explicit HierarchicalTiff(const std::string& path); virtual ~HierarchicalTiff() {
--- a/Framework/Inputs/OpenSlideLibrary.h Fri Apr 20 14:23:54 2018 +0200 +++ b/Framework/Inputs/OpenSlideLibrary.h Mon Apr 23 16:21:58 2018 +0200 @@ -47,7 +47,7 @@ FunctionReadRegion readRegion_; public: - OpenSlideLibrary(const std::string& path); + explicit OpenSlideLibrary(const std::string& path); static OpenSlideLibrary& GetInstance(); @@ -85,7 +85,7 @@ Image(OpenSlideLibrary& that, const std::string& path); - Image(const std::string& path); + explicit Image(const std::string& path); ~Image() {
--- a/Framework/Inputs/TiledPyramidStatistics.h Fri Apr 20 14:23:54 2018 +0200 +++ b/Framework/Inputs/TiledPyramidStatistics.h Mon Apr 23 16:21:58 2018 +0200 @@ -36,7 +36,7 @@ unsigned int countDecodedTiles_; public: - TiledPyramidStatistics(ITiledPyramid& source); // Takes ownership + explicit TiledPyramidStatistics(ITiledPyramid& source); // Takes ownership virtual ~TiledPyramidStatistics();
--- a/Framework/Jpeg2000Reader.cpp Fri Apr 20 14:23:54 2018 +0200 +++ b/Framework/Jpeg2000Reader.cpp Mon Apr 23 16:21:58 2018 +0200 @@ -97,7 +97,8 @@ } public: - OpenJpegDecoder(Jpeg2000Format format) : dinfo_(NULL) + explicit OpenJpegDecoder(Jpeg2000Format format) : + dinfo_(NULL) { switch (format) {
--- a/Framework/Jpeg2000Writer.cpp Fri Apr 20 14:23:54 2018 +0200 +++ b/Framework/Jpeg2000Writer.cpp Mon Apr 23 16:21:58 2018 +0200 @@ -246,7 +246,8 @@ #endif public: - OpenJpegOutput(OpenJpegEncoder& encoder) : cio_(NULL) + explicit OpenJpegOutput(OpenJpegEncoder& encoder) : + cio_(NULL) { #if ORTHANC_OPENJPEG_MAJOR_VERSION == 1 cio_ = opj_cio_open(reinterpret_cast<opj_common_ptr>(encoder.GetObject()), NULL, 0);
--- a/Framework/Outputs/HierarchicalTiffWriter.cpp Fri Apr 20 14:23:54 2018 +0200 +++ b/Framework/Outputs/HierarchicalTiffWriter.cpp Mon Apr 23 16:21:58 2018 +0200 @@ -386,6 +386,8 @@ unsigned int tileHeight) : PyramidWriterBase(pixelFormat, compression, tileWidth, tileHeight), currentLevel_(0), + nextX_(0), + nextY_(0), isFirst_(true) { tiff_ = TIFFOpen(path.c_str(), "w");
--- a/ViewerPlugin/Plugin.cpp Fri Apr 20 14:23:54 2018 +0200 +++ b/ViewerPlugin/Plugin.cpp Mon Apr 23 16:21:58 2018 +0200 @@ -322,7 +322,7 @@ transcoderSemaphore_.reset(new Orthanc::Semaphore(threads)); char info[1024]; - sprintf(info, "The whole-slide imaging plugin will use at most %d threads to transcode the tiles", threads); + sprintf(info, "The whole-slide imaging plugin will use at most %u threads to transcode the tiles", threads); OrthancPluginLogWarning(context_, info); OrthancPluginSetDescription(context, "Provides a Web viewer of whole-slide microscopic images within Orthanc.");