From 3200d04d75c5e7556ed8880b155533e881a4d1e1 Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Thu, 20 Aug 2009 16:47:44 +0000 Subject: 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 --- apps/settings.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/settings.h') 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); bool set_int(const unsigned char* string, const char* unit, int voice_unit, const int* variable, void (*function)(int), int step, int min, int max, - void (*formatter)(char*, size_t, int, const char*) ); + const char* (*formatter)(char*, size_t, int, const char*) ); /* use this one if you need to create a lang from the value (i.e with TALK_ID()) */ bool set_int_ex(const unsigned char* string, const char* unit, int voice_unit, const int* variable, void (*function)(int), int step, int min, int max, - void (*formatter)(char*, size_t, int, const char*), + const char* (*formatter)(char*, size_t, int, const char*), int32_t (*get_talk_id)(int, int)); void set_file(const char* filename, char* setting, int maxlen); -- cgit v1.2.3