summaryrefslogtreecommitdiff
path: root/core/object
diff options
context:
space:
mode:
authorjmb462 <jmb462@gmail.com>2022-02-16 00:52:32 +0100
committerJean-Michel Bernard <jmb462@gmail.com>2022-02-16 11:38:24 +0100
commitdcd2a92af3cc85b50ee2c02dc64589da6d429e8c (patch)
treef46c8abb14e2677131c058625e9dee57babf131e /core/object
parentf5b9cbaff6f0a058d08187b3124948ae68848cd0 (diff)
Port existing _notification code to use switch statements (part 1/3)
Diffstat (limited to 'core/object')
-rw-r--r--core/object/script_language.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/object/script_language.cpp b/core/object/script_language.cpp
index 9fec7c397d..b14296b815 100644
--- a/core/object/script_language.cpp
+++ b/core/object/script_language.cpp
@@ -46,10 +46,12 @@ bool ScriptServer::languages_finished = false;
ScriptEditRequestFunction ScriptServer::edit_request_func = nullptr;
void Script::_notification(int p_what) {
- if (p_what == NOTIFICATION_POSTINITIALIZE) {
- if (EngineDebugger::is_active()) {
- EngineDebugger::get_script_debugger()->set_break_language(get_language());
- }
+ switch (p_what) {
+ case NOTIFICATION_POSTINITIALIZE: {
+ if (EngineDebugger::is_active()) {
+ EngineDebugger::get_script_debugger()->set_break_language(get_language());
+ }
+ } break;
}
}