Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
prop: tiny optimization for string handling
  • Loading branch information
perexg committed Apr 15, 2016
1 parent 0e5fc7c commit bdde12b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/prop.c
Expand Up @@ -317,13 +317,9 @@ prop_read_value
htsmsg_add_s64(m, name, atomic_get_s64((int64_t *)val));
break;
case PT_STR:
if (optmask & PO_LOCALE) {
if ((s = *(const char **)val))
htsmsg_add_str(m, name, lang ? tvh_gettext_lang(lang, s) : s);
} else {
if ((s = *(const char **)val))
htsmsg_add_str(m, name, s);
}
if ((s = *(const char **)val))
htsmsg_add_str(m, name, (optmask & PO_LOCALE) != 0 && lang ?
tvh_gettext_lang(lang, s) : s);
break;
case PT_DBL:
htsmsg_add_dbl(m, name, *(double*)val);
Expand Down

0 comments on commit bdde12b

Please sign in to comment.