diff tools/lib64gfx.c @ 1591:3cc7b2aadda3

Add inline helper function fmtGetEncDecOp() and use it.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 14 May 2018 05:53:22 +0300
parents ca087c0cc9c4
children 501e31f11c29
line wrap: on
line diff
--- a/tools/lib64gfx.c	Mon May 14 05:38:58 2018 +0300
+++ b/tools/lib64gfx.c	Mon May 14 05:53:22 2018 +0300
@@ -88,7 +88,7 @@
     int nbanks = 0;
     for (int i = 0; i < D64_MAX_ENCDEC_OPS; i++)
     {
-        const DMC64EncDecOp *op = &fmt->encdecOps[i];
+        const DMC64EncDecOp *op = fmtGetEncDecOp(fmt, i);
         if (op->type == DT_LAST)
             break;
 
@@ -610,7 +610,7 @@
     // Perform decoding
     for (int i = 0; i < D64_MAX_ENCDEC_OPS; i++)
     {
-        const DMC64EncDecOp *op = &fmt->encdecOps[i];
+        const DMC64EncDecOp *op = fmtGetEncDecOp(fmt, i);
         const Uint8 *src;
         DMC64MemBlock *blk;
         char *blkname;
@@ -771,7 +771,7 @@
     // Perform encoding
     for (int i = 0; i < D64_MAX_ENCDEC_OPS; i++)
     {
-        const DMC64EncDecOp *op = &fmt->encdecOps[i];
+        const DMC64EncDecOp *op = fmtGetEncDecOp(fmt, i);
         size_t size, chksize;
         const DMC64MemBlock *blk;
         char *blkname;