changeset 1659:99b8ab61dc1b

Micro-optimization.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 30 May 2018 14:45:14 +0300
parents c005d84e9bf8
children 7555c8803529
files tools/libgfx.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tools/libgfx.c	Wed May 30 13:53:57 2018 +0300
+++ b/tools/libgfx.c	Wed May 30 14:45:14 2018 +0300
@@ -1636,6 +1636,7 @@
     Uint8 *buf;
     size_t bufLen;
     int res = DMERR_OK;
+    const int nplanes = iff->bmhd.nplanes;
 
     *read = 0;
 
@@ -1649,7 +1650,6 @@
     // Decode the chunk
     for (int yc = 0; yc < img->height; yc++)
     {
-        const int nplanes = iff->bmhd.nplanes;
         Uint8 *dp = img->data + (yc * img->pitch);
 
         dmMemset(dp, 0, img->pitch);