clean up some more array iterations

This commit is contained in:
Wim Taymans 2022-09-30 17:23:05 +02:00
parent 0b98614bea
commit 9b6e504c19
14 changed files with 88 additions and 114 deletions

View file

@ -109,10 +109,9 @@ static const struct channelmix_upmix_info {
static inline uint32_t channelmix_upmix_from_label(const char *label)
{
uint32_t i;
for (i = 0; i < SPA_N_ELEMENTS(channelmix_upmix_info); i++) {
if (spa_streq(channelmix_upmix_info[i].label, label))
return channelmix_upmix_info[i].upmix;
SPA_FOR_EACH_ELEMENT_VAR(channelmix_upmix_info, i) {
if (spa_streq(i->label, label))
return i->upmix;
}
return CHANNELMIX_UPMIX_NONE;
}