glib-aux/prioq: rename NM_PRIOQ_FOREACH_ITEM() to nm_prioq_for_each()

Our for-each macros are usually lower-case and are spelled differently. Rename.
Also add to clang-format as this is a for-each macro.
This commit is contained in:
Thomas Haller 2023-03-13 21:47:34 +01:00
parent d840ddd959
commit cf21da4ed1
No known key found for this signature in database
GPG Key ID: 29C2366E4DFC5728
2 changed files with 2 additions and 1 deletions

View File

@ -120,6 +120,7 @@ ForEachMacros: [
'nm_manager_for_each_device',
'nm_manager_for_each_device_safe',
'nm_platform_iter_obj_for_each',
'nm_prioq_for_each',
'nmp_cache_iter_for_each',
'nmp_cache_iter_for_each_link',
'nmp_cache_iter_for_each_reverse',

View File

@ -55,7 +55,7 @@ nm_prioq_peek(NMPrioq *q)
void *nm_prioq_pop(NMPrioq *q);
#define NM_PRIOQ_FOREACH_ITEM(q, p) for (unsigned _i = 0; (p = nm_prioq_peek_by_index(q, _i)); _i++)
#define nm_prioq_for_each(q, p) for (unsigned _i = 0; (p = nm_prioq_peek_by_index((q), _i)); _i++)
_nm_pure static inline unsigned
nm_prioq_size(NMPrioq *q)