mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 05:31:01 +00:00 
			
		
		
		
	Port existing _notification code to use switch statements (part 1/3)
This commit is contained in:
		
							parent
							
								
									f5b9cbaff6
								
							
						
					
					
						commit
						dcd2a92af3
					
				
					 39 changed files with 1836 additions and 1666 deletions
				
			
		|  | @ -849,11 +849,14 @@ void EditorPlugin::_editor_project_settings_changed() { | |||
| 	emit_signal(SNAME("project_settings_changed")); | ||||
| } | ||||
| void EditorPlugin::_notification(int p_what) { | ||||
| 	if (p_what == NOTIFICATION_ENTER_TREE) { | ||||
| 		EditorNode::get_singleton()->connect("project_settings_changed", callable_mp(this, &EditorPlugin::_editor_project_settings_changed)); | ||||
| 	} | ||||
| 	if (p_what == NOTIFICATION_EXIT_TREE) { | ||||
| 		EditorNode::get_singleton()->disconnect("project_settings_changed", callable_mp(this, &EditorPlugin::_editor_project_settings_changed)); | ||||
| 	switch (p_what) { | ||||
| 		case NOTIFICATION_ENTER_TREE: { | ||||
| 			EditorNode::get_singleton()->connect("project_settings_changed", callable_mp(this, &EditorPlugin::_editor_project_settings_changed)); | ||||
| 		} break; | ||||
| 
 | ||||
| 		case NOTIFICATION_EXIT_TREE: { | ||||
| 			EditorNode::get_singleton()->disconnect("project_settings_changed", callable_mp(this, &EditorPlugin::_editor_project_settings_changed)); | ||||
| 		} break; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 jmb462
						jmb462