# HG changeset patch # User Sebastien Jodogne # Date 1604681136 -3600 # Node ID cab272485c384ce6061c1e9baa5cd551e7fa7832 # Parent 628201cb48c233190fa954859a90323168d928af minor optimization diff -r 628201cb48c2 -r cab272485c38 Framework/ImageToolbox.cpp --- 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); }