mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-11-04 09:15:29 +01:00 
			
		
		
		
	Use make_irr instead of new + drop() in Game::handleCallbacks
This commit is contained in:
		@@ -1871,26 +1871,26 @@ inline bool Game::handleCallbacks()
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (g_gamecallback->changepassword_requested) {
 | 
			
		||||
		(new GUIPasswordChange(guienv, guiroot, -1,
 | 
			
		||||
				       &g_menumgr, client, texture_src))->drop();
 | 
			
		||||
		(void)make_irr<GUIPasswordChange>(guienv, guiroot, -1,
 | 
			
		||||
				       &g_menumgr, client, texture_src);
 | 
			
		||||
		g_gamecallback->changepassword_requested = false;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (g_gamecallback->changevolume_requested) {
 | 
			
		||||
		(new GUIVolumeChange(guienv, guiroot, -1,
 | 
			
		||||
				     &g_menumgr, texture_src))->drop();
 | 
			
		||||
		(void)make_irr<GUIVolumeChange>(guienv, guiroot, -1,
 | 
			
		||||
				     &g_menumgr, texture_src);
 | 
			
		||||
		g_gamecallback->changevolume_requested = false;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (g_gamecallback->keyconfig_requested) {
 | 
			
		||||
		(new GUIKeyChangeMenu(guienv, guiroot, -1,
 | 
			
		||||
				      &g_menumgr, texture_src))->drop();
 | 
			
		||||
		(void)make_irr<GUIKeyChangeMenu>(guienv, guiroot, -1,
 | 
			
		||||
				      &g_menumgr, texture_src);
 | 
			
		||||
		g_gamecallback->keyconfig_requested = false;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (!g_gamecallback->show_open_url_dialog.empty()) {
 | 
			
		||||
		(new GUIOpenURLMenu(guienv, guiroot, -1,
 | 
			
		||||
				 &g_menumgr, texture_src, g_gamecallback->show_open_url_dialog))->drop();
 | 
			
		||||
		(void)make_irr<GUIOpenURLMenu>(guienv, guiroot, -1,
 | 
			
		||||
				 &g_menumgr, texture_src, g_gamecallback->show_open_url_dialog);
 | 
			
		||||
		g_gamecallback->show_open_url_dialog.clear();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user