mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	Use std::size instead of sizeof(a) / sizeof(a[0]) pattern throughout the codebase.
				
					
				
			This commit is contained in:
		
							parent
							
								
									f0f5319b0b
								
							
						
					
					
						commit
						e34f1f504c
					
				
					 33 changed files with 71 additions and 67 deletions
				
			
		|  | @ -89,7 +89,7 @@ static FloatConstantDef float_constant_defs[] = { | |||
| 	{ "Sqrt2", Math_SQRT2, TTRC("Sqrt2 constant (1.414214). Square root of 2.") } | ||||
| }; | ||||
| 
 | ||||
| const int MAX_FLOAT_CONST_DEFS = sizeof(float_constant_defs) / sizeof(FloatConstantDef); | ||||
| constexpr int MAX_FLOAT_CONST_DEFS = std::size(float_constant_defs); | ||||
| 
 | ||||
| ///////////////////
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lukas Tenbrink
						Lukas Tenbrink