mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 21:21:06 +01:00 
			
		
		
		
	Viewports: trying to treat GetMainViewport() as const. Reducing unnecessary casts of ImGuiViewportP*
Metrics: readded root Drawlists node in metrics to match master. The (void*) casts are implying const-casst but currently left GetMainViewport() as returning non-const.
This commit is contained in:
		| @@ -6575,7 +6575,7 @@ void ImGui::EndMenuBar() | ||||
| bool ImGui::BeginMainMenuBar() | ||||
| { | ||||
|     ImGuiContext& g = *GImGui; | ||||
|     ImGuiViewportP* viewport = (ImGuiViewportP*)GetMainViewport(); | ||||
|     ImGuiViewportP* viewport = (ImGuiViewportP*)(void*)GetMainViewport(); | ||||
|     ImGuiWindow* menu_bar_window = FindWindowByName("##MainMenuBar"); | ||||
|  | ||||
|     // For the main menu bar, which cannot be moved, we honor g.Style.DisplaySafeAreaPadding to ensure text can be visible on a TV set. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user