Save some RAM by changing a char[] into a const char * in struct afmt_entry. Make other fields const too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24970 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
38efc71615
commit
7ab1cd7b1b
2 changed files with 8 additions and 8 deletions
|
@ -64,10 +64,10 @@
|
||||||
|
|
||||||
extern struct wps_state wps_state;
|
extern struct wps_state wps_state;
|
||||||
|
|
||||||
static char* get_codectype(const struct mp3entry* id3)
|
static const char* get_codectype(const struct mp3entry* id3)
|
||||||
{
|
{
|
||||||
if (id3 && id3->codectype < AFMT_NUM_CODECS) {
|
if (id3 && id3->codectype < AFMT_NUM_CODECS) {
|
||||||
return (char*)audio_formats[id3->codectype].label;
|
return audio_formats[id3->codectype].label;
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,16 +153,16 @@ extern const int afmt_rec_format[AFMT_NUM_CODECS];
|
||||||
/* record describing the audio format */
|
/* record describing the audio format */
|
||||||
struct afmt_entry
|
struct afmt_entry
|
||||||
{
|
{
|
||||||
char label[8]; /* format label */
|
const char *label; /* format label */
|
||||||
#if CONFIG_CODEC == SWCODEC
|
#if CONFIG_CODEC == SWCODEC
|
||||||
char *codec_root_fn; /* root codec filename (sans _enc and .codec) */
|
const char *codec_root_fn; /* root codec filename (sans _enc and .codec) */
|
||||||
#ifdef HAVE_RECORDING
|
#ifdef HAVE_RECORDING
|
||||||
char *codec_enc_root_fn; /* filename of encoder codec */
|
const char *codec_enc_root_fn; /* filename of encoder codec */
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
char *ext_list; /* double NULL terminated extension
|
const char *ext_list; /* double NULL terminated extension
|
||||||
list for type with the first as
|
list for type with the first as
|
||||||
the default for recording */
|
the default for recording */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* database of labels and codecs. add formats per above enum */
|
/* database of labels and codecs. add formats per above enum */
|
||||||
|
|
Loading…
Reference in a new issue