Port existing _notification code to use switch statements (part 1/3)

This commit is contained in:
jmb462 2022-02-16 00:52:32 +01:00 committed by Jean-Michel Bernard
parent f5b9cbaff6
commit dcd2a92af3
39 changed files with 1836 additions and 1666 deletions

View file

@ -1163,6 +1163,7 @@ void EditorFileSystem::_notification(int p_what) {
call_deferred(SNAME("scan")); //this should happen after every editor node entered the tree
} break;
case NOTIFICATION_EXIT_TREE: {
Thread &active_thread = thread.is_started() ? thread : thread_sources;
if (use_threads && active_thread.is_started()) {
@ -1184,8 +1185,8 @@ void EditorFileSystem::_notification(int p_what) {
}
filesystem = nullptr;
new_filesystem = nullptr;
} break;
case NOTIFICATION_PROCESS: {
if (use_threads) {
if (scanning_changes) {