diff options
author | Nils Wallménius <nils@rockbox.org> | 2009-08-20 16:47:44 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2009-08-20 16:47:44 +0000 |
commit | 3200d04d75c5e7556ed8880b155533e881a4d1e1 (patch) | |
tree | 188e2c9525b25cb8922a14766e51ab02bad3f831 /apps/settings.h | |
parent | 0a1728444882cdbc6a0c815bd88464de25ad94e9 (diff) | |
download | rockbox-3200d04d75c5e7556ed8880b155533e881a4d1e1.tar.gz rockbox-3200d04d75c5e7556ed8880b155533e881a4d1e1.zip |
Make the formatter functions used by the settings return a pointer to avoid usless copying of lang strings, this brought with it a long chain of const correctness and a few random cleanups
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22440 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.h')
-rw-r--r-- | apps/settings.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/settings.h b/apps/settings.h index c45e3b3110..cbd7b6d3b3 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -271,13 +271,13 @@ bool set_bool(const char* string, const bool* variable); | |||
271 | bool set_int(const unsigned char* string, const char* unit, int voice_unit, | 271 | bool set_int(const unsigned char* string, const char* unit, int voice_unit, |
272 | const int* variable, | 272 | const int* variable, |
273 | void (*function)(int), int step, int min, int max, | 273 | void (*function)(int), int step, int min, int max, |
274 | void (*formatter)(char*, size_t, int, const char*) ); | 274 | const char* (*formatter)(char*, size_t, int, const char*) ); |
275 | 275 | ||
276 | /* use this one if you need to create a lang from the value (i.e with TALK_ID()) */ | 276 | /* use this one if you need to create a lang from the value (i.e with TALK_ID()) */ |
277 | bool set_int_ex(const unsigned char* string, const char* unit, int voice_unit, | 277 | bool set_int_ex(const unsigned char* string, const char* unit, int voice_unit, |
278 | const int* variable, | 278 | const int* variable, |
279 | void (*function)(int), int step, int min, int max, | 279 | void (*function)(int), int step, int min, int max, |
280 | void (*formatter)(char*, size_t, int, const char*), | 280 | const char* (*formatter)(char*, size_t, int, const char*), |
281 | int32_t (*get_talk_id)(int, int)); | 281 | int32_t (*get_talk_id)(int, int)); |
282 | 282 | ||
283 | void set_file(const char* filename, char* setting, int maxlen); | 283 | void set_file(const char* filename, char* setting, int maxlen); |