# HG changeset patch # User Sebastien Jodogne # Date 1604680595 -3600 # Node ID 4a2c63ae8f99dc8d998484ee5f98682ffba28e52 # Parent 59f95b9ea858f998237429783d86b57cd145e875 minor optimization diff -r 59f95b9ea858 -r 4a2c63ae8f99 OrthancStone/Sources/Scene2D/Internals/CairoTextRenderer.cpp --- a/OrthancStone/Sources/Scene2D/Internals/CairoTextRenderer.cpp Fri Nov 06 17:30:36 2020 +0100 +++ b/OrthancStone/Sources/Scene2D/Internals/CairoTextRenderer.cpp Fri Nov 06 17:36:35 2020 +0100 @@ -48,10 +48,11 @@ throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); } + const unsigned int height = source->GetHeight(); const unsigned int width = source->GetWidth(); const Color& color = layer.GetColor(); - - for (unsigned int y = 0; y < source->GetHeight(); y++) + + for (unsigned int y = 0; y < height; y++) { const uint8_t* p = reinterpret_cast(source->GetConstRow(y)); uint8_t* q = reinterpret_cast(accessor.GetRow(y));