diff options
author | Nils Wallménius <nils@rockbox.org> | 2009-10-10 09:57:03 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2009-10-10 09:57:03 +0000 |
commit | 46a0db45dd2436442f3679b21b7cf631358be585 (patch) | |
tree | 7930bbd10629e05de3ee11671cc3e1daa2374e3e /apps/gui/pitchscreen.c | |
parent | bb1549aad76ee096b00451ff3640748d74ab3a08 (diff) | |
download | rockbox-46a0db45dd2436442f3679b21b7cf631358be585.tar.gz rockbox-46a0db45dd2436442f3679b21b7cf631358be585.zip |
Slight const police and avoid copying a lang string
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23065 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/pitchscreen.c')
-rw-r--r-- | apps/gui/pitchscreen.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/gui/pitchscreen.c b/apps/gui/pitchscreen.c index 78d049be10..8f542e8f27 100644 --- a/apps/gui/pitchscreen.c +++ b/apps/gui/pitchscreen.c | |||
@@ -199,7 +199,7 @@ static void pitchscreen_draw(struct screen *display, int max_lines, | |||
199 | #endif | 199 | #endif |
200 | ) | 200 | ) |
201 | { | 201 | { |
202 | unsigned char* ptr; | 202 | const char* ptr; |
203 | char buf[32]; | 203 | char buf[32]; |
204 | int w, h; | 204 | int w, h; |
205 | bool show_lang_pitch; | 205 | bool show_lang_pitch; |
@@ -318,10 +318,10 @@ static void pitchscreen_draw(struct screen *display, int max_lines, | |||
318 | { | 318 | { |
319 | if(at_limit) | 319 | if(at_limit) |
320 | { | 320 | { |
321 | snprintf(buf, sizeof(buf), "%s", str(LANG_STRETCH_LIMIT)); | 321 | const char * const p = str(LANG_STRETCH_LIMIT); |
322 | display->getstringsize(buf, &w, &h); | 322 | display->getstringsize(p, &w, &h); |
323 | display->putsxy((pitch_viewports[PITCH_MID].width / 2) - (w / 2), | 323 | display->putsxy((pitch_viewports[PITCH_MID].width / 2) - (w / 2), |
324 | (pitch_viewports[PITCH_MID].height / 2) + h, buf); | 324 | (pitch_viewports[PITCH_MID].height / 2) + h, p); |
325 | if (w > width_used) | 325 | if (w > width_used) |
326 | width_used = w; | 326 | width_used = w; |
327 | } | 327 | } |