Rockbox mail archiveSubject: Re: cvs: firmware/drivers lcd.c,1.76,1.77 lcd.h,1.21,1.22
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: Fri, 09 Aug 2002 17:48:31 +0200
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;
Received on 2002-08-09