util.h: Use size_t for static array sizes
This commit is contained in:
		
							parent
							
								
									20e46a98dd
								
							
						
					
					
						commit
						ccba946973
					
				
					 3 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -332,7 +332,7 @@ struct InputPrivate
 | 
			
		|||
	{
 | 
			
		||||
		int index;
 | 
			
		||||
 | 
			
		||||
		if (code < 0 || code > mapToIndexN-1)
 | 
			
		||||
		if (code < 0 || (size_t) code > mapToIndexN-1)
 | 
			
		||||
			index = 0;
 | 
			
		||||
		else
 | 
			
		||||
			index = mapToIndex[code];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -103,7 +103,7 @@ inline bool contains(const C &c, const V &v)
 | 
			
		|||
 | 
			
		||||
#define ARRAY_SIZE(obj) (sizeof(obj) / sizeof((obj)[0]))
 | 
			
		||||
 | 
			
		||||
#define elementsN(obj) const int obj##N = ARRAY_SIZE(obj)
 | 
			
		||||
#define elementsN(obj) const size_t obj##N = ARRAY_SIZE(obj)
 | 
			
		||||
 | 
			
		||||
#define DECL_ATTR_DETAILED(name, type, keyword1, keyword2) \
 | 
			
		||||
	keyword1 type get##name() keyword2; \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue