GS_Generate(): remove Warning
diff is int, abs is "int abs(int);" current->data.pal.h is byte but ds->gradients[id].hue is float. So cast to int before the substraction
This commit is contained in:
		
							parent
							
								
									00d51d5494
								
							
						
					
					
						commit
						71a72d2fae
					
				@ -1092,7 +1092,7 @@ void GS_Generate(T_Gradient_set * ds,T_Cluster_set * cs)
 | 
			
		||||
        best_diff=99999999;
 | 
			
		||||
        for (id=0;id<ds->nb;id++)
 | 
			
		||||
        {
 | 
			
		||||
            diff=abs(current->data.pal.h - ds->gradients[id].hue);
 | 
			
		||||
            diff=abs(current->data.pal.h - (int)ds->gradients[id].hue);
 | 
			
		||||
            if ((best_diff>diff) && (diff<16))
 | 
			
		||||
            {
 | 
			
		||||
                best_gradient=id;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user