remove unnecessary checks
This commit is contained in:
parent
a88c2fad2a
commit
8ae094dd98
2
main.c
2
main.c
|
@ -120,7 +120,7 @@ render(sdl_state_t state)
|
||||||
void
|
void
|
||||||
plot_rgb(rgb_t canvas[], uint16_t x, uint16_t y, rgb_t colour)
|
plot_rgb(rgb_t canvas[], uint16_t x, uint16_t y, rgb_t colour)
|
||||||
{
|
{
|
||||||
if (x < W && y < H && x >= 0 && y >= 0)
|
if (x < W && y < H)
|
||||||
canvas[x + y * W] = colour;
|
canvas[x + y * W] = colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user