forked from mirror/OpenTTD
(svn r1557) Replace strange if () do while () construct with a plain for ()
This commit is contained in:
4
gfx.c
4
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;
|
byte *sp = (byte*)s;
|
||||||
|
|
||||||
assert(h >= 0);
|
assert(h >= 0);
|
||||||
if (h != 0) do {
|
for (; h != 0; --h) {
|
||||||
memcpy(dp, sp, w);
|
memcpy(dp, sp, w);
|
||||||
dp += dpitch;
|
dp += dpitch;
|
||||||
sp += spitch;
|
sp += spitch;
|
||||||
} while (--h);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user