Rockbox mail archiveSubject: Re: Why does struct user_settings use ints when chars would do?
From: Björn Stenberg (bjorn_at_haxx.se)
TP Diffenbach wrote:
Simply because the struct is a logical representation of the data, rather than a physical one. Numeric variables are thus stored in integers.
Using a consistent type also makes things like set_integer() possible.
We waste perhaps 100 bytes for data, but gain them back in simpler code.
Page was last modified "Jan 10 2012" The Rockbox Crew