Mercurial > hg > orthanc-wsi
diff Framework/Jpeg2000Reader.cpp @ 209:628201cb48c2
fix build
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 06 Nov 2020 17:44:35 +0100 |
parents | a1c265cb2174 |
children | 1e864138f0da |
line wrap: on
line diff
--- a/Framework/Jpeg2000Reader.cpp Tue Aug 04 17:13:35 2020 +0200 +++ b/Framework/Jpeg2000Reader.cpp Fri Nov 06 17:44:35 2020 +0100 @@ -303,11 +303,14 @@ int32_t* q = image_->comps[channel].data; assert(q != NULL); - for (unsigned int y = 0; y < target.GetHeight(); y++) + const unsigned int width = target.GetWidth(); + const unsigned int height = target.GetHeight(); + + for (unsigned int y = 0; y < height; y++) { uint8_t *p = reinterpret_cast<uint8_t*>(target.GetRow(y)) + channel; - for (unsigned int x = 0; x < target.GetWidth(); x++, p += targetIncrement) + for (unsigned int x = 0; x < width; x++, p += targetIncrement) { *p = *q; q++;