Mercurial > hg > orthanc
diff OrthancFramework/Sources/Images/PamReader.cpp @ 4278:9279de56a405
avoid multiple calls to GetWidth() and GetHeight() on pixel loops
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 03 Nov 2020 20:05:55 +0100 |
parents | 2d5209153b32 |
children | b30a8de92ad9 |
line wrap: on
line diff
--- a/OrthancFramework/Sources/Images/PamReader.cpp Tue Nov 03 18:45:32 2020 +0100 +++ b/OrthancFramework/Sources/Images/PamReader.cpp Tue Nov 03 20:05:55 2020 +0100 @@ -229,7 +229,7 @@ { uint16_t* pixel = reinterpret_cast<uint16_t*>(GetRow(h)); - for (unsigned int w = 0; w < GetWidth(); ++w, ++pixel) + for (unsigned int w = 0; w < width; ++w, ++pixel) { #if defined(__EMSCRIPTEN__) // For WebAssembly /*