diff options
author | kobewi <kobewi4e@gmail.com> | 2023-07-11 16:18:10 +0200 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2023-10-05 11:35:29 +0200 |
commit | 09b30be86dd3034b46ae26c1ecde1f9ad941a5c8 (patch) | |
tree | 286927a2063b42d350257896e308dfc1ed6fb03a /editor/import/post_import_plugin_skeleton_renamer.cpp | |
parent | c7ed5d795ef396650e1e2853cf0d76cbdb1cb45e (diff) | |
download | redot-engine-09b30be86dd3034b46ae26c1ecde1f9ad941a5c8.tar.gz |
Add vararg call() method to C++ Callable
Diffstat (limited to 'editor/import/post_import_plugin_skeleton_renamer.cpp')
-rw-r--r-- | editor/import/post_import_plugin_skeleton_renamer.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/editor/import/post_import_plugin_skeleton_renamer.cpp b/editor/import/post_import_plugin_skeleton_renamer.cpp index 0c48c8ef76..6704347877 100644 --- a/editor/import/post_import_plugin_skeleton_renamer.cpp +++ b/editor/import/post_import_plugin_skeleton_renamer.cpp @@ -119,7 +119,7 @@ void PostImportPluginSkeletonRenamer::_internal_process(InternalImportCategory p // Rename bones in all Nodes by calling method. { - Vector<Variant> vargs; + Array vargs; vargs.push_back(p_base_scene); vargs.push_back(skeleton); Dictionary rename_map_dict; @@ -127,18 +127,11 @@ void PostImportPluginSkeletonRenamer::_internal_process(InternalImportCategory p rename_map_dict[E->key] = E->value; } vargs.push_back(rename_map_dict); - const Variant **argptrs = (const Variant **)alloca(sizeof(const Variant **) * vargs.size()); - const Variant *args = vargs.ptr(); - uint32_t argcount = vargs.size(); - for (uint32_t i = 0; i < argcount; i++) { - argptrs[i] = &args[i]; - } TypedArray<Node> nodes = p_base_scene->find_children("*"); while (nodes.size()) { Node *nd = Object::cast_to<Node>(nodes.pop_back()); - Callable::CallError ce; - nd->callp("_notify_skeleton_bones_renamed", argptrs, argcount, ce); + nd->callv("_notify_skeleton_bones_renamed", vargs); } } } |