[vlc-devel] commit: Use const char* when needed ( easier to understand if a function will try to grab a string). ( Rémi Duraffort )

git version control git at videolan.org
Mon Dec 15 20:41:50 CET 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Dec 15 20:28:02 2008 +0100| [b516e441f3daaccdf7492034b619de3e643567a5] | committer: Rémi Duraffort 

Use const char* when needed (easier to understand if a function will try to grab a string).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b516e441f3daaccdf7492034b619de3e643567a5
---

 include/vlc_osd.h  |    6 +++---
 src/osd/osd_text.c |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/vlc_osd.h b/include/vlc_osd.h
index cb78626..df855f6 100644
--- a/include/vlc_osd.h
+++ b/include/vlc_osd.h
@@ -590,9 +590,9 @@ static inline void osd_SetMenuUpdate( osd_menu_t *p_osd, bool b_value )
  * object. The types are declared in the include file include/vlc_osd.h
  * @see vlc_osd.h
  */
-VLC_EXPORT( int, osd_ShowTextRelative, ( spu_t *, int, char *, text_style_t *, int, int, int, mtime_t ) );
-VLC_EXPORT( int, osd_ShowTextAbsolute, ( spu_t *, int, char *, text_style_t *, int, int, int, mtime_t, mtime_t ) );
-VLC_EXPORT( void,osd_Message, ( spu_t *, int, char *, ... ) LIBVLC_FORMAT( 3, 4 ) );
+VLC_EXPORT( int, osd_ShowTextRelative, ( spu_t *, int, const char *, text_style_t *, int, int, int, mtime_t ) );
+VLC_EXPORT( int, osd_ShowTextAbsolute, ( spu_t *, int, const char *, text_style_t *, int, int, int, mtime_t, mtime_t ) );
+VLC_EXPORT( void, osd_Message, ( spu_t *, int, char *, ... ) LIBVLC_FORMAT( 3, 4 ) );
 
 /**
  * Default feedback images
diff --git a/src/osd/osd_text.c b/src/osd/osd_text.c
index ddc3dd1..2c7a1c5 100644
--- a/src/osd/osd_text.c
+++ b/src/osd/osd_text.c
@@ -42,7 +42,7 @@
  * \param i_duration Amount of time the text is to be shown.
  */
 int osd_ShowTextRelative( spu_t *p_spu, int i_channel,
-                           char *psz_string, text_style_t *p_style,
+                           const char *psz_string, text_style_t *p_style,
                            int i_flags, int i_hmargin, int i_vmargin,
                            mtime_t i_duration )
 {
@@ -68,7 +68,7 @@ int osd_ShowTextRelative( spu_t *p_spu, int i_channel,
  *               is about to be shown
  */
 int osd_ShowTextAbsolute( spu_t *p_spu_channel, int i_channel,
-                           char *psz_string, text_style_t *p_style,
+                           const char *psz_string, text_style_t *p_style,
                            int i_flags, int i_hmargin, int i_vmargin,
                            mtime_t i_start, mtime_t i_stop )
 {




More information about the vlc-devel mailing list