[vlc-devel] commit: taglib: factorize. ( R??mi Duraffort )

jpd at videolan.org jpd at videolan.org
Tue Nov 10 12:01:38 CET 2009


On Mon, Nov 09, 2009 at 07:39:15PM +0100, git version control wrote:
> vlc | branch: master | R??mi Duraffort <ivoire at videolan.org> | [...]
[...]
> +#define SET( a, b )                                             \
> +    psz_meta = input_item_Get ## a( p_item );                   \
> +    if( psz_meta )                                              \
> +    {                                                           \
> +        String* psz_tmp = new String( psz_meta, String::UTF8 ); \
> +        p_tag->set##b( *psz_tmp );                              \
> +        delete psz_tmp;                                         \
> +    }                                                           \
> +    free( psz_meta );

I think you can safely use a String instead of a String* and save a pass
through new and delete.




More information about the vlc-devel mailing list