summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorTimo Schwarzer <me@timoschwarzer.com>2020-05-25 21:55:03 +0200
committerTimo Schwarzer <me@timoschwarzer.com>2020-05-25 21:55:03 +0200
commit05b32fc01d7b74c530104682d286e561eb79092d (patch)
treeb3da8e0ceed2844c0dc75d24b4587cf19f91d8a7 /scene
parent34d7e30798b4b4fc96dff729cbc2df3410e95e73 (diff)
Add static_assert checks where code assumes VARIANT_ARG_MAX == 5
Diffstat (limited to 'scene')
-rw-r--r--scene/main/scene_tree.cpp3
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();
}