From 0b2d1badecc48b5cbff5ec088b29c6e9acc5e1d0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 8 Sep 2019 00:12:26 +1000 Subject: Cleanup: use post increment/decrement When the result isn't used, prefer post increment/decrement (already used nearly everywhere in Blender). --- source/blender/imbuf/intern/targa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/imbuf/intern/targa.c') diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c index f7b7df52e46..b1077a6ae91 100644 --- a/source/blender/imbuf/intern/targa.c +++ b/source/blender/imbuf/intern/targa.c @@ -748,7 +748,7 @@ ImBuf *imb_loadtarga(const unsigned char *mem, if (cmap) { /* apply color map */ rect = ibuf->rect; - for (size = ibuf->x * ibuf->y; size > 0; --size, ++rect) { + for (size = ibuf->x * ibuf->y; size > 0; size--, rect++) { int cmap_index = *rect; if (cmap_index >= 0 && cmap_index < cmap_max) { *rect = cmap[cmap_index]; @@ -761,7 +761,7 @@ ImBuf *imb_loadtarga(const unsigned char *mem, if (tga.pixsize == 16) { unsigned int col; rect = ibuf->rect; - for (size = ibuf->x * ibuf->y; size > 0; --size, ++rect) { + for (size = ibuf->x * ibuf->y; size > 0; size--, rect++) { col = *rect; cp = (uchar *)rect; mem = (uchar *)&col; -- cgit v1.2.3