Mercurial > hg > orthanc-wsi
changeset 321:0c34b6625c67
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 16 Oct 2024 15:01:46 +0200 |
parents | 196d0e18afa0 |
children | 778e08291d52 |
files | Framework/DicomizerParameters.cpp Framework/Inputs/OpenSlidePyramid.cpp Framework/TiffReader.h |
diffstat | 3 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/DicomizerParameters.cpp Wed Oct 16 14:58:02 2024 +0200 +++ b/Framework/DicomizerParameters.cpp Wed Oct 16 15:01:46 2024 +0200 @@ -365,7 +365,7 @@ void DicomizerParameters::SetTiffAlignment(unsigned int alignment) { - if (alignment <= 0) + if (alignment == 0) { throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); }
--- a/Framework/Inputs/OpenSlidePyramid.cpp Wed Oct 16 14:58:02 2024 +0200 +++ b/Framework/Inputs/OpenSlidePyramid.cpp Wed Oct 16 15:01:46 2024 +0200 @@ -56,10 +56,10 @@ { isEmpty = true; - for (unsigned int y = 0; y < height && isEmpty; y++) + for (unsigned int yy = 0; yy < height && isEmpty; yy++) { - const uint8_t* p = reinterpret_cast<const uint8_t*>(source->GetConstRow(y)); - for (unsigned int x = 0; x < width && isEmpty; x++) + const uint8_t* p = reinterpret_cast<const uint8_t*>(source->GetConstRow(yy)); + for (unsigned int xx = 0; xx < width && isEmpty; xx++) { if (p[3] != 0) { @@ -83,11 +83,11 @@ uint8_t backgroundRed, backgroundGreen, backgroundBlue; GetBackgroundColor(backgroundRed, backgroundGreen, backgroundBlue); - for (unsigned int y = 0; y < height; y++) + for (unsigned int yy = 0; yy < height; yy++) { - const uint8_t* p = reinterpret_cast<const uint8_t*>(source->GetConstRow(y)); - uint8_t* q = reinterpret_cast<uint8_t*>(target.GetRow(y)); - for (unsigned int x = 0; x < width; x++) + const uint8_t* p = reinterpret_cast<const uint8_t*>(source->GetConstRow(yy)); + uint8_t* q = reinterpret_cast<uint8_t*>(target.GetRow(yy)); + for (unsigned int xx = 0; xx < width; xx++) { /** Alpha blending using integer arithmetics only (16 bits avoids overflows)