diff OrthancStone/Sources/Fonts/GlyphTextureAlphabet.cpp @ 1624:59f95b9ea858

fix build
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 06 Nov 2020 17:30:36 +0100
parents 8563ea5d8ae4
children 9ac2a65d4172
line wrap: on
line diff
--- a/OrthancStone/Sources/Fonts/GlyphTextureAlphabet.cpp	Wed Nov 04 11:39:15 2020 +0100
+++ b/OrthancStone/Sources/Fonts/GlyphTextureAlphabet.cpp	Fri Nov 06 17:30:36 2020 +0100
@@ -157,12 +157,15 @@
 
       //Orthanc::ImageProcessing::Copy(target, bitmap->GetBitmap());
 
-      for (unsigned int y = 0; y < source.GetHeight(); y++)
+      const unsigned int width = source.GetWidth();
+      const unsigned int height = source.GetHeight();
+      
+      for (unsigned int y = 0; y < height; y++)
       {
         const uint8_t* p = reinterpret_cast<const uint8_t*>(source.GetConstRow(y));
         uint8_t* q = reinterpret_cast<uint8_t*>(target.GetRow(y));
 
-        for (unsigned int x = 0; x < source.GetWidth(); x++)
+        for (unsigned int x = 0; x < width; x++)
         {
           // Premultiplied alpha
           q[0] = 0;