|
Rockbox mail archiveSubject: Re: cvs: firmware/drivers lcd.c,1.76,1.77 lcd.h,1.21,1.22Re: 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; Youdonotwritelikethisinnormallifedoyou ? Regards, Vladimir Received on 2002-08-09 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |