Mercurial > hg > orthanc-wsi
changeset 210:cab272485c38
minor optimization
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 06 Nov 2020 17:45:36 +0100 |
parents | 628201cb48c2 |
children | 7459819f3176 |
files | Framework/ImageToolbox.cpp |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/ImageToolbox.cpp Fri Nov 06 17:44:35 2020 +0100 +++ b/Framework/ImageToolbox.cpp Fri Nov 06 17:45:36 2020 +0100 @@ -191,7 +191,8 @@ unsigned int pitch = GetBytesPerPixel(source.GetFormat()) * source.GetWidth(); target.resize(pitch * source.GetHeight()); - for (unsigned int i = 0; i < source.GetHeight(); i++) + const unsigned int height = source.GetHeight(); + for (unsigned int i = 0; i < height; i++) { memcpy(&target[i * pitch], source.GetConstRow(i), pitch); }