1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Use switch consistently in _notification (scene folder)

This commit is contained in:
Rémi Verschelde
2022-02-15 18:06:48 +01:00
parent 171021145d
commit 0f5455230c
127 changed files with 2853 additions and 2601 deletions

View File

@@ -464,20 +464,22 @@ void HTTPRequest::_request_done(int p_status, int p_code, const PackedStringArra
}
void HTTPRequest::_notification(int p_what) {
if (p_what == NOTIFICATION_INTERNAL_PROCESS) {
if (use_threads.is_set()) {
return;
}
bool done = _update_connection();
if (done) {
set_process_internal(false);
}
}
switch (p_what) {
case NOTIFICATION_INTERNAL_PROCESS: {
if (use_threads.is_set()) {
return;
}
bool done = _update_connection();
if (done) {
set_process_internal(false);
}
} break;
if (p_what == NOTIFICATION_EXIT_TREE) {
if (requesting) {
cancel_request();
}
case NOTIFICATION_EXIT_TREE: {
if (requesting) {
cancel_request();
}
} break;
}
}