mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Use switch consistently in _notification (scene folder)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user