From 0f5455230c8955be0c6533574bd3d5b6f50792b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 15 Feb 2022 18:06:48 +0100 Subject: Use `switch` consistently in `_notification` (`scene` folder) --- scene/3d/area_3d.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'scene/3d/area_3d.cpp') diff --git a/scene/3d/area_3d.cpp b/scene/3d/area_3d.cpp index 5123a6eb6c..78c968a3d4 100644 --- a/scene/3d/area_3d.cpp +++ b/scene/3d/area_3d.cpp @@ -344,10 +344,14 @@ void Area3D::_clear_monitoring() { } void Area3D::_notification(int p_what) { - if (p_what == NOTIFICATION_EXIT_TREE) { - _clear_monitoring(); - } else if (p_what == NOTIFICATION_ENTER_TREE) { - _initialize_wind(); + switch (p_what) { + case NOTIFICATION_EXIT_TREE: { + _clear_monitoring(); + } break; + + case NOTIFICATION_ENTER_TREE: { + _initialize_wind(); + } break; } } -- cgit v1.2.3