diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-06-19 23:51:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-19 23:51:22 +0200 |
commit | 35414f1dec5725499f6f6f7e8715ab16440f1f5f (patch) | |
tree | cce3b8c71744116cf65307a099560c4febe747c6 /scene/main/scene_tree.cpp | |
parent | 3e0708094276fdb80a6b6929070fecf6fe5858bc (diff) | |
parent | 05b32fc01d7b74c530104682d286e561eb79092d (diff) |
Merge pull request #39053 from timoschwarzer/static-assert-variant-arg-max
Add static_assert checks where code assumes VARIANT_ARG_MAX == 5
Diffstat (limited to 'scene/main/scene_tree.cpp')
-rw-r--r-- | scene/main/scene_tree.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index a0e10f30c0..3c3c7533a3 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -170,6 +170,7 @@ void SceneTree::_flush_ugc() { v[i] = E->get()[i]; } + static_assert(VARIANT_ARG_MAX == 5, "This code needs to be updated if VARIANT_ARG_MAX != 5"); call_group_flags(GROUP_CALL_REALTIME, E->key().group, E->key().call, v[0], v[1], v[2], v[3], v[4]); unique_group_calls.erase(E); @@ -907,6 +908,7 @@ Variant SceneTree::_call_group_flags(const Variant **p_args, int p_argcount, Cal v[i] = *p_args[i + 3]; } + static_assert(VARIANT_ARG_MAX == 5, "This code needs to be updated if VARIANT_ARG_MAX != 5"); call_group_flags(flags, group, method, v[0], v[1], v[2], v[3], v[4]); return Variant(); } @@ -926,6 +928,7 @@ Variant SceneTree::_call_group(const Variant **p_args, int p_argcount, Callable: v[i] = *p_args[i + 2]; } + static_assert(VARIANT_ARG_MAX == 5, "This code needs to be updated if VARIANT_ARG_MAX != 5"); call_group_flags(0, group, method, v[0], v[1], v[2], v[3], v[4]); return Variant(); } |