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: Vladimir Pantelic (pan_at_nt.tu-darmstadt.de)
Date: 2002-08-09


Björn Stenberg wrote:
> 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.

... and please do not save "spaces", they come for free on most editors:

if (x + nx > LCD_WIDTH)
        nx = LCD_WIDTH - x;

Youdonotwritelikethisinnormallifedoyou ?

Regards,

Vladimir



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