diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-03-09 20:48:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-09 20:48:45 +0100 |
commit | 33c907f9f5b3ec1a43d0251d7cac80da49b5b658 (patch) | |
tree | 6adb187024a8de7ed0b2ebf3e7c75ae07d8407bf /editor/debugger | |
parent | f17c5501eb4bb6a86d9f2f07567da081eb8991b0 (diff) | |
parent | 21637dfc2535a00f531b8b664c1e66ba34d11eb0 (diff) |
Merge pull request #58929 from reduz/remove-variant-arg-macros
Remove VARIANT_ARG* macros
Diffstat (limited to 'editor/debugger')
-rw-r--r-- | editor/debugger/editor_debugger_node.cpp | 4 | ||||
-rw-r--r-- | editor/debugger/editor_debugger_node.h | 2 | ||||
-rw-r--r-- | editor/debugger/script_editor_debugger.cpp | 16 | ||||
-rw-r--r-- | editor/debugger/script_editor_debugger.h | 2 |
4 files changed, 11 insertions, 13 deletions
diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp index d5a4f5d138..1a7b11d888 100644 --- a/editor/debugger/editor_debugger_node.cpp +++ b/editor/debugger/editor_debugger_node.cpp @@ -610,12 +610,12 @@ void EditorDebuggerNode::_save_node_requested(ObjectID p_id, const String &p_fil } // Remote inspector/edit. -void EditorDebuggerNode::_method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) { +void EditorDebuggerNode::_method_changeds(void *p_ud, Object *p_base, const StringName &p_name, const Variant **p_args, int p_argcount) { if (!singleton) { return; } _for_all(singleton->tabs, [&](ScriptEditorDebugger *dbg) { - dbg->_method_changed(p_base, p_name, VARIANT_ARG_PASS); + dbg->_method_changed(p_base, p_name, p_args, p_argcount); }); } diff --git a/editor/debugger/editor_debugger_node.h b/editor/debugger/editor_debugger_node.h index 6fcdbf5f73..36f99113ad 100644 --- a/editor/debugger/editor_debugger_node.h +++ b/editor/debugger/editor_debugger_node.h @@ -171,7 +171,7 @@ public: // Remote inspector/edit. void request_remote_tree(); - static void _method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE); + static void _method_changeds(void *p_ud, Object *p_base, const StringName &p_name, const Variant **p_args, int p_argcount); static void _property_changeds(void *p_ud, Object *p_base, const StringName &p_property, const Variant &p_value); // LiveDebug diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index 0b9631c816..453e9e3a0c 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -1064,18 +1064,16 @@ int ScriptEditorDebugger::_get_res_path_cache(const String &p_path) { return last_path_id; } -void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) { +void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_name, const Variant **p_args, int p_argcount) { if (!p_base || !live_debug || !is_session_active() || !EditorNode::get_singleton()->get_edited_scene()) { return; } Node *node = Object::cast_to<Node>(p_base); - VARIANT_ARGPTRS - - for (int i = 0; i < VARIANT_ARG_MAX; i++) { + for (int i = 0; i < p_argcount; i++) { //no pointers, sorry - if (argptr[i] && (argptr[i]->get_type() == Variant::OBJECT || argptr[i]->get_type() == Variant::RID)) { + if (p_args[i]->get_type() == Variant::OBJECT || p_args[i]->get_type() == Variant::RID) { return; } } @@ -1087,9 +1085,9 @@ void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_n Array msg; msg.push_back(pathid); msg.push_back(p_name); - for (int i = 0; i < VARIANT_ARG_MAX; i++) { + for (int i = 0; i < p_argcount; i++) { //no pointers, sorry - msg.push_back(*argptr[i]); + msg.push_back(*p_args[i]); } _put_msg("scene:live_node_call", msg); @@ -1105,9 +1103,9 @@ void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_n Array msg; msg.push_back(pathid); msg.push_back(p_name); - for (int i = 0; i < VARIANT_ARG_MAX; i++) { + for (int i = 0; i < p_argcount; i++) { //no pointers, sorry - msg.push_back(*argptr[i]); + msg.push_back(*p_args[i]); } _put_msg("scene:live_res_call", msg); diff --git a/editor/debugger/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h index e4d3a2fa09..486ac26ef7 100644 --- a/editor/debugger/script_editor_debugger.h +++ b/editor/debugger/script_editor_debugger.h @@ -187,7 +187,7 @@ private: void _live_edit_set(); void _live_edit_clear(); - void _method_changed(Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE); + void _method_changed(Object *p_base, const StringName &p_name, const Variant **p_args, int p_argcount); void _property_changed(Object *p_base, const StringName &p_property, const Variant &p_value); void _error_activated(); |