summaryrefslogtreecommitdiff
path: root/gfx.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-18 15:26:14 +0000
committertron <tron@openttd.org>2005-01-18 15:26:14 +0000
commiteaa6bf3f42f357ee29786698f484d51b640e2d52 (patch)
tree29b74744496a4f4fe79973043a0bc716a4861cec /gfx.c
parent5bcf3d2bc0620a40728ebb2c0dcbe34fcd6f5084 (diff)
downloadopenttd-eaa6bf3f42f357ee29786698f484d51b640e2d52.tar.xz
(svn r1557) Replace strange if () do while () construct with a plain for ()
Diffstat (limited to 'gfx.c')
-rw-r--r--gfx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gfx.c b/gfx.c
index 28e90792a..da2d03328 100644
--- a/gfx.c
+++ b/gfx.c
@@ -23,11 +23,11 @@ void memcpy_pitch(void *d, void *s, int w, int h, int spitch, int dpitch)
byte *sp = (byte*)s;
assert(h >= 0);
- if (h != 0) do {
+ for (; h != 0; --h) {
memcpy(dp, sp, w);
dp += dpitch;
sp += spitch;
- } while (--h);
+ }
}