diff options
author | tron <tron@openttd.org> | 2005-01-18 15:26:14 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-18 15:26:14 +0000 |
commit | 4eb8f833fe87e4563a9e7fa311fcbf00fcacfde3 (patch) | |
tree | 29b74744496a4f4fe79973043a0bc716a4861cec | |
parent | a003bb0b0e7eab9dbba683c1ef2b2170e0b9985c (diff) | |
download | openttd-4eb8f833fe87e4563a9e7fa311fcbf00fcacfde3.tar.xz |
(svn r1557) Replace strange if () do while () construct with a plain for ()
-rw-r--r-- | gfx.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); + } } |