mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
array: add and use pw_array_consume
This commit is contained in:
parent
720b7b5c6a
commit
649448fb5f
2 changed files with 6 additions and 7 deletions
|
|
@ -145,14 +145,8 @@ static int clear_subjects(struct metadata *this, uint32_t subject)
|
|||
static void clear_items(struct metadata *this)
|
||||
{
|
||||
struct item *item;
|
||||
|
||||
while (true) {
|
||||
item = pw_array_first(&this->metadata);
|
||||
if (!pw_array_check(&this->metadata, item))
|
||||
break;
|
||||
|
||||
pw_array_consume(item, &this->metadata)
|
||||
clear_subjects(this, item->subject);
|
||||
}
|
||||
pw_array_reset(&this->metadata);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue