comparison 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
comparison
equal deleted inserted replaced
4277:c5ca798b158a 4278:9279de56a405
227 { 227 {
228 for (unsigned int h = 0; h < height; ++h) 228 for (unsigned int h = 0; h < height; ++h)
229 { 229 {
230 uint16_t* pixel = reinterpret_cast<uint16_t*>(GetRow(h)); 230 uint16_t* pixel = reinterpret_cast<uint16_t*>(GetRow(h));
231 231
232 for (unsigned int w = 0; w < GetWidth(); ++w, ++pixel) 232 for (unsigned int w = 0; w < width; ++w, ++pixel)
233 { 233 {
234 #if defined(__EMSCRIPTEN__) // For WebAssembly 234 #if defined(__EMSCRIPTEN__) // For WebAssembly
235 /* 235 /*
236 236
237 crash (2019-08-05): 237 crash (2019-08-05):