mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 13:11:05 +01:00 
			
		
		
		
	ImVec2/ImVec4 no-parameters constructs init to 0.0f. Saner. Couldn't measure perf differences in a simple stress test compiled in Debug mode
This commit is contained in:
		
							
								
								
									
										4
									
								
								imgui.h
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								imgui.h
									
									
									
									
									
								
							| @@ -53,7 +53,7 @@ typedef int (*ImGuiTextEditCallback)(ImGuiTextEditCallbackData *data); | ||||
| struct ImVec2 | ||||
| { | ||||
|     float x, y; | ||||
|     ImVec2() {} | ||||
|     ImVec2() { x = y = 0.0f; } | ||||
|     ImVec2(float _x, float _y) { x = _x; y = _y; } | ||||
|  | ||||
| #ifdef IM_VEC2_CLASS_EXTRA | ||||
| @@ -64,7 +64,7 @@ struct ImVec2 | ||||
| struct ImVec4 | ||||
| { | ||||
|     float x, y, z, w; | ||||
|     ImVec4() {} | ||||
|     ImVec4() { x = y = z = w = 0.0f; } | ||||
|     ImVec4(float _x, float _y, float _z, float _w) { x = _x; y = _y; z = _z; w = _w; } | ||||
|  | ||||
| #ifdef IM_VEC4_CLASS_EXTRA | ||||
|   | ||||
		Reference in New Issue
	
	Block a user