|
|
Rockbox mail archiveSubject: Re: Why does struct user_settings use ints when chars would do?From: Björn Stenberg (bjorn_at_haxx.se) Date: 2003-05-06
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.
-- Björn
Page was last modified "Jan 10 2012" The Rockbox Crew |