# HG changeset patch # User Sebastien Jodogne # Date 1442412050 -7200 # Node ID 644c32c07306fde4ea1903e0425c0c0422a186a8 # Parent c40fe92a68e74eb5d38161ea2964a81f2589a56e cppcheck diff -r c40fe92a68e7 -r 644c32c07306 Core/Images/Font.cpp --- a/Core/Images/Font.cpp Wed Sep 16 15:18:59 2015 +0200 +++ b/Core/Images/Font.cpp Wed Sep 16 16:00:50 2015 +0200 @@ -45,7 +45,7 @@ Font::~Font() { for (Characters::iterator it = characters_.begin(); - it != characters_.end(); it++) + it != characters_.end(); ++it) { delete it->second; } diff -r c40fe92a68e7 -r 644c32c07306 Core/Images/Font.h --- a/Core/Images/Font.h Wed Sep 16 15:18:59 2015 +0200 +++ b/Core/Images/Font.h Wed Sep 16 16:00:50 2015 +0200 @@ -37,10 +37,11 @@ #include #include #include +#include namespace Orthanc { - class Font + class Font : public boost::noncopyable { private: struct Character @@ -72,6 +73,10 @@ const uint8_t color[4]) const; public: + Font() + { + } + ~Font(); void LoadFromMemory(const std::string& font); diff -r c40fe92a68e7 -r 644c32c07306 Core/Images/FontRegistry.h --- a/Core/Images/FontRegistry.h Wed Sep 16 15:18:59 2015 +0200 +++ b/Core/Images/FontRegistry.h Wed Sep 16 16:00:50 2015 +0200 @@ -38,7 +38,7 @@ namespace Orthanc { - class FontRegistry + class FontRegistry : public boost::noncopyable { private: typedef std::vector Fonts; diff -r c40fe92a68e7 -r 644c32c07306 Core/Images/Image.h --- a/Core/Images/Image.h Wed Sep 16 15:18:59 2015 +0200 +++ b/Core/Images/Image.h Wed Sep 16 16:00:50 2015 +0200 @@ -40,15 +40,15 @@ class Image : public ImageAccessor { private: - ImageBuffer buffer_; + ImageBuffer image_; public: Image(PixelFormat format, unsigned int width, unsigned int height) : - buffer_(format, width, height) + image_(format, width, height) { - ImageAccessor accessor = buffer_.GetAccessor(); + ImageAccessor accessor = image_.GetAccessor(); AssignWritable(format, width, height, accessor.GetPitch(), accessor.GetBuffer()); } }; diff -r c40fe92a68e7 -r 644c32c07306 OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp --- a/OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp Wed Sep 16 15:18:59 2015 +0200 +++ b/OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp Wed Sep 16 16:00:50 2015 +0200 @@ -578,7 +578,7 @@ StoreCreatedInstance(someInstance, call, *dicom); } } - catch (OrthancException& e) + catch (OrthancException&) { // Error: Remove the newly-created series @@ -589,7 +589,7 @@ context.GetIndex().DeleteResource(dummy, series, ResourceType_Series); } - throw e; + throw; } std::string series; @@ -715,7 +715,7 @@ } for (ModuleTags::const_iterator it = moduleTags.begin(); - it != moduleTags.end(); it++) + it != moduleTags.end(); ++it) { std::string t = it->Format(); if (siblingTags.isMember(t)) @@ -786,7 +786,6 @@ else { throw OrthancException(ErrorCode_CreateDicomUseDataUriScheme); - return; } } diff -r c40fe92a68e7 -r 644c32c07306 OrthancServer/ParsedDicomFile.cpp --- a/OrthancServer/ParsedDicomFile.cpp Wed Sep 16 15:18:59 2015 +0200 +++ b/OrthancServer/ParsedDicomFile.cpp Wed Sep 16 16:00:50 2015 +0200 @@ -272,7 +272,8 @@ E_TransferSyntax transferSyntax) : element_(element), length_(element.getLength(transferSyntax)), - offset_(0) + offset_(0), + chunkSize_(0) { static const size_t CHUNK_SIZE = 64 * 1024; // Use chunks of max 64KB chunk_.resize(CHUNK_SIZE);