Skip to content

Commit 4d69105

Browse files
committed
Fix warnings and errors
1 parent da02a46 commit 4d69105

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

editor/scene_tree_dock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4642,7 +4642,7 @@ void SceneTreeDock::_bind_methods() {
46424642
ADD_SIGNAL(MethodInfo("remote_tree_selected"));
46434643
ADD_SIGNAL(MethodInfo("add_node_used"));
46444644
ADD_SIGNAL(MethodInfo("node_created", PropertyInfo(Variant::OBJECT, "node", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
4645-
ADD_SIGNAL(MethodInfo("nodes_reparented"), PropertyInfo(Variant::ARRAY, "nodes"), PropertyInfo(Variant::NODE_PATH, "new_parent"));
4645+
ADD_SIGNAL(MethodInfo("nodes_reparented", PropertyInfo(Variant::ARRAY, "nodes"), PropertyInfo(Variant::NODE_PATH, "new_parent")));
46464646
}
46474647

46484648
SceneTreeDock *SceneTreeDock::singleton = nullptr;

modules/multi_godot/multi_godot.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,9 @@ void MultiGodot::_recurse_initiate(Object *obj, String base_path) {
648648
Variant value = obj->get(info.name);
649649

650650
if (value.get_type() == Variant::OBJECT) {
651-
Object *obj = value.operator Object *();
652-
if (obj) {
653-
_recurse_initiate(obj, this_path);
651+
Object *child_obj = value.operator Object *();
652+
if (child_obj) {
653+
_recurse_initiate(child_obj, this_path);
654654
}
655655
else {
656656
value = false;
@@ -686,16 +686,16 @@ void MultiGodot::_recurse_node_parameters(Node *root, Object *obj, String select
686686
Variant previous = previous_property_values.get(index);
687687

688688
if (current.get_type() == Variant::OBJECT) { // Pointer type, can't be sent over interwebz!
689-
Object *obj = current.operator Object *();
690-
if (!previous && obj) {
689+
Object *child_object = current.operator Object *();
690+
if (!previous && child_object) {
691691
print_line("Resource created at path " + this_param_path);
692-
_recurse_initiate(obj, this_param_path);
693-
_call_func(this, "_instantiate_resource", {selected_node_path, this_param_path, obj->get_class()});
692+
_recurse_initiate(child_object, this_param_path);
693+
_call_func(this, "_instantiate_resource", {selected_node_path, this_param_path, child_object->get_class()});
694694
previous_property_values.set(index, current);
695695
continue;
696696
}
697-
if (obj) {
698-
_recurse_node_parameters(root, obj, selected_node_path, this_param_path);
697+
if (child_object) {
698+
_recurse_node_parameters(root, child_object, selected_node_path, this_param_path);
699699
previous_property_values.set(index, current);
700700
continue;
701701
}
@@ -1113,9 +1113,7 @@ void MultiGodot::_instantiate_resource(String node_path, String resource_path, S
11131113
}
11141114

11151115
void MultiGodot::_reparent_nodes(Array paths, String new_parent_path) {
1116-
SceneTreeEditor *scene_tree_editor = SceneTreeDock::get_singleton()->get_tree_editor();
11171116
Node *root = EditorNode::get_singleton()->get_edited_scene();
1118-
11191117
Node *parent = root->get_node(new_parent_path);
11201118
if (!parent) {
11211119
print_error("Remote requested to reparent some nodes to a parent at path " + new_parent_path + " but it doesn't exist.");

0 commit comments

Comments
 (0)