|
Rockbox mail archiveSubject: Re: WPS tokenizerRe: WPS tokenizer
From: Magnus Holmgren <lear_at_algonet.se>
Date: Thu, 29 Mar 2007 21:34:54 +0200 Nicolas Pennequin wrote: > I've updated my WPS tokenizer patch again. <...> > Also, I'd appreciate it a lot if people who know what makes code big and what > helps make it smaller (and not only them !) could have a look at my code and > tell me what could be improved. A couple of comments/nits: * Make rtc_tags const too. * Use for loops where appropriate (like searching the rtc_tags or all_tags arrays). * To avoid warnings about unused arguments, a common idiom is "(void) arg;". * How is show_sb_on_wps set to false? By clearing the wps_data struct somewhere? * Factor out the "get filename" code for images. * Is there any sane way to avoid the gotos in wps_parse? E.g., by calling a function or something? * Consider manual common subexpression elimination in some places, like in the conditionals in draw_progress_bar. In my experience, GCC doesn't always do it where you might expect it to, and it can increase readability (shorter expressions). * Shouldn't "while(wps_string " be "while(*wps_string "? Magnus Received on 2007-03-29 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |