[vlc-devel] [PATCH] hotkeys: Delay subtitle track only if it exists and is enabled.
Zoran Turalija
zoran.turalija at gmail.com
Wed Apr 10 18:17:40 CEST 2013
On Wed, Apr 10, 2013 at 05:04:37PM +0200, Rémi Denis-Courmont wrote:
> > + if( i_count == 0 )
> > + DisplayMessage( p_vout,
> > + _("No delay set; subtitle
> track:
> > %s"),
> > + _("N/A") );
> > + else
> > + DisplayMessage( p_vout,
> > + _("No delay set; subtitle
> track:
> > %s"),
> > + _("Disabled") );
>
> Factor code, seriously:
>
> DisplayMessage( p_vout, _("No delay set; subtitle track: %s"),
> vlc_gettext( i_count ? N_("Disabled") : N_("N/A") ) );
Thanks for pointing out.
It was one liner split across two rows. I see a lot of possible one liner
ternary factoring opportunities, too...
eg. modules/control/hotkeys.c | dbc2edaca2d8d2412c6c197124c4c8788c3fc5d6
if( i_action == ACTIONID_SUBPOS_DOWN )
i_pos = var_DecInteger( p_input, "sub-margin" );
else
i_pos = var_IncInteger( p_input, "sub-margin" );
I redid my patches...
--
Kind regards,
Zoran Turalija
More information about the vlc-devel
mailing list