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/plugins/rockpaint.c | |
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/plugins/rockpaint.c')
-rw-r--r-- | apps/plugins/rockpaint.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c index a4084a2ca7..219f013ed8 100644 --- a/apps/plugins/rockpaint.c +++ b/apps/plugins/rockpaint.c | |||
@@ -600,8 +600,8 @@ char bbuf[MAX_PATH+1]; /* used by file and font browsers */ | |||
600 | char bbuf_s[MAX_PATH+1]; /* used by file and font browsers */ | 600 | char bbuf_s[MAX_PATH+1]; /* used by file and font browsers */ |
601 | struct tree_context *tree = NULL; | 601 | struct tree_context *tree = NULL; |
602 | 602 | ||
603 | static char * browse_get_name_cb( int selected_item, void *data, | 603 | static const char* browse_get_name_cb(int selected_item, void *data, |
604 | char *buffer, size_t buffer_len ) | 604 | char *buffer, size_t buffer_len) |
605 | { | 605 | { |
606 | int *indexes = (int *) data; | 606 | int *indexes = (int *) data; |
607 | struct entry* dc = tree->dircache; | 607 | struct entry* dc = tree->dircache; |
@@ -609,7 +609,7 @@ static char * browse_get_name_cb( int selected_item, void *data, | |||
609 | (void) buffer; | 609 | (void) buffer; |
610 | (void) buffer_len; | 610 | (void) buffer_len; |
611 | 611 | ||
612 | return (e->name); | 612 | return e->name; |
613 | } | 613 | } |
614 | 614 | ||
615 | static bool browse( char *dst, int dst_size, const char *start ) | 615 | static bool browse( char *dst, int dst_size, const char *start ) |
@@ -633,8 +633,8 @@ static bool browse( char *dst, int dst_size, const char *start ) | |||
633 | } | 633 | } |
634 | bbuf_s[0] = '\0'; | 634 | bbuf_s[0] = '\0'; |
635 | 635 | ||
636 | rb->gui_synclist_init( &browse_list, browse_get_name_cb, | 636 | rb->gui_synclist_init(&browse_list, browse_get_name_cb, |
637 | (void*) indexes, false, 1, NULL ); | 637 | (void*) indexes, false, 1, NULL); |
638 | 638 | ||
639 | tree = rb->tree_get_context(); | 639 | tree = rb->tree_get_context(); |
640 | backup = *tree; | 640 | backup = *tree; |