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/2d/multimesh_instance_2d.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'scene/2d/multimesh_instance_2d.cpp') diff --git a/scene/2d/multimesh_instance_2d.cpp b/scene/2d/multimesh_instance_2d.cpp index e1af99d931..8f72ff1757 100644 --- a/scene/2d/multimesh_instance_2d.cpp +++ b/scene/2d/multimesh_instance_2d.cpp @@ -29,13 +29,16 @@ /*************************************************************************/ #include "multimesh_instance_2d.h" + #include "scene/scene_string_names.h" void MultiMeshInstance2D::_notification(int p_what) { - if (p_what == NOTIFICATION_DRAW) { - if (multimesh.is_valid()) { - draw_multimesh(multimesh, texture); - } + switch (p_what) { + case NOTIFICATION_DRAW: { + if (multimesh.is_valid()) { + draw_multimesh(multimesh, texture); + } + } break; } } -- cgit v1.2.3