Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: cvs: firmware/drivers lcd.c,1.76,1.77 lcd.h,1.21,1.22
From: Björn Stenberg (bjorn_at_haxx.se)
Date: 2002-08-09


Markus Braun wrote:
> + if (x>LCD_WIDTH) return;
> + if (y>LCD_HEIGHT) return;
> +
> + if (x+nx>LCD_WIDTH) nx=LCD_WIDTH-x;
> + if (y+ny>LCD_HEIGHT) ny=LCD_HEIGHT-y;

Please dont "save lines" by putting condition and action on the same line like this. It may look simpler, but it actually makes the code harder to scan.

/The Code Police

-- 
Björn



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa