changeset 21582:239f2c145b2f

Mark utf8_get_char parameter as const and fix a compiler warning
author reimar
date Mon, 11 Dec 2006 22:37:17 +0000
parents 37c795807a1d
children f746c28a324c
files libvo/sub.c libvo/sub.h
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/sub.c	Mon Dec 11 22:32:13 2006 +0000
+++ b/libvo/sub.c	Mon Dec 11 22:37:17 2006 +0000
@@ -150,22 +150,22 @@
     }
 }
 
-unsigned utf8_get_char(char **str) {
-  uint8_t *strp = (uint8_t *)*str;
+unsigned utf8_get_char(const char **str) {
+  const uint8_t *strp = (const uint8_t *)*str;
   unsigned c;
   GET_UTF8(c, *strp++, goto no_utf8;);
-  *str = (char *)strp;
+  *str = (const char *)strp;
   return c;
 
 no_utf8:
-  strp = (uint8_t *)*str;
+  strp = (const uint8_t *)*str;
   c = *strp++;
-  *str = (char *)strp;
+  *str = (const char *)strp;
   return c;
 }
 
 inline static void vo_update_text_osd(mp_osd_obj_t* obj,int dxs,int dys){
-	unsigned char *cp=vo_osd_text;
+	const char *cp=vo_osd_text;
 	int x=20;
 	int h=0;
 	int font;
--- a/libvo/sub.h	Mon Dec 11 22:32:13 2006 +0000
+++ b/libvo/sub.h	Mon Dec 11 22:37:17 2006 +0000
@@ -125,7 +125,7 @@
 
 extern int vo_osd_changed_flag;
 
-unsigned utf8_get_char(char **str);
+unsigned utf8_get_char(const char **str);
 
 #ifdef USE_DVDNAV
 #include <inttypes.h>