mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	clean up some more array iterations
This commit is contained in:
		
							parent
							
								
									0b98614bea
								
							
						
					
					
						commit
						9b6e504c19
					
				
					 14 changed files with 88 additions and 114 deletions
				
			
		| 
						 | 
				
			
			@ -1241,11 +1241,10 @@ static const struct class *classes[] =
 | 
			
		|||
 | 
			
		||||
static const struct class *find_class(const char *type, uint32_t version)
 | 
			
		||||
{
 | 
			
		||||
	size_t i;
 | 
			
		||||
	for (i = 0; i < SPA_N_ELEMENTS(classes); i++) {
 | 
			
		||||
		if (spa_streq(classes[i]->type, type) &&
 | 
			
		||||
		    classes[i]->version <= version)
 | 
			
		||||
			return classes[i];
 | 
			
		||||
	SPA_FOR_EACH_ELEMENT_VAR(classes, c) {
 | 
			
		||||
		if (spa_streq((*c)->type, type) &&
 | 
			
		||||
		    (*c)->version <= version)
 | 
			
		||||
			return *c;
 | 
			
		||||
	}
 | 
			
		||||
	return NULL;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue