Mercurial > mplayer.hg
changeset 32790:5c23e57bb0a4
Remove desultory parameter checks.
These functions will only be called with parameters already checked
or the checked parameters don't harm.
author | ib |
---|---|
date | Thu, 10 Feb 2011 13:24:00 +0000 |
parents | 236a95445ebb |
children | ece4313fbf15 |
files | gui/skin/font.c |
diffstat | 1 files changed, 3 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/skin/font.c Thu Feb 10 12:28:43 2011 +0000 +++ b/gui/skin/font.c Thu Feb 10 13:24:00 2011 +0000 @@ -189,8 +189,6 @@ gboolean utf8; unsigned char *p; - if ( ( !Fonts[id] )||( !str[0] ) ) return 0; - utf8 = g_utf8_validate( str, -1, NULL); p = (unsigned char *) str; @@ -209,8 +207,6 @@ gboolean utf8; unsigned char *p; - if ( ( !Fonts[id] )||( !str[0] ) ) return 0; - utf8 = g_utf8_validate( str, -1, NULL); p = (unsigned char *) str; @@ -234,15 +230,12 @@ uint32_t * obuf; gboolean utf8; - iw=item->width; id=item->fontid; + tw=fntTextWidth( id,txt ); - if ( ( !item )|| - ( !Fonts[id] )|| - ( !txt[0] )|| - ( !fntTextWidth( id,txt ) ) ) return NULL; + if ( !tw ) return NULL; - tw=fntTextWidth( id,txt ); + iw=item->width; fbw=Fonts[id]->Bitmap.Width; if ( item->Bitmap.Image == NULL )