diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-02-15 18:06:48 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-02-15 18:44:55 +0100 |
commit | 0f5455230c8955be0c6533574bd3d5b6f50792b6 (patch) | |
tree | 2167f70782174feda2541c163d264c62402b50be /scene/3d/light_3d.cpp | |
parent | 171021145d49ffdda9110869d35ee63a946af9f8 (diff) |
Use `switch` consistently in `_notification` (`scene` folder)
Diffstat (limited to 'scene/3d/light_3d.cpp')
-rw-r--r-- | scene/3d/light_3d.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/scene/3d/light_3d.cpp b/scene/3d/light_3d.cpp index d88bb815bc..b2e605a262 100644 --- a/scene/3d/light_3d.cpp +++ b/scene/3d/light_3d.cpp @@ -177,12 +177,11 @@ void Light3D::_update_visibility() { } void Light3D::_notification(int p_what) { - if (p_what == NOTIFICATION_VISIBILITY_CHANGED) { - _update_visibility(); - } - - if (p_what == NOTIFICATION_ENTER_TREE) { - _update_visibility(); + switch (p_what) { + case NOTIFICATION_VISIBILITY_CHANGED: + case NOTIFICATION_ENTER_TREE: { + _update_visibility(); + } break; } } |