diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-01 13:25:23 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-01 13:25:23 +0100 |
commit | 0a9e6e478e3183d7bf3c5cb895c706bc6275d3ea (patch) | |
tree | f0aafb3a890737c99179bda69830ecae24774770 /scene | |
parent | c461d3880fe6e0561dafd79054185e25d36a0e34 (diff) | |
parent | 435bf4e030f420c887898cd63d225e1c87447e25 (diff) |
Merge pull request #71800 from akien-mga/ci-codespell-action
CI: Add official codespell action with PR annotations
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/navigation_agent_2d.cpp | 2 | ||||
-rw-r--r-- | scene/3d/navigation_agent_3d.cpp | 2 | ||||
-rw-r--r-- | scene/main/node.cpp | 6 | ||||
-rw-r--r-- | scene/resources/resource_format_text.cpp | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/scene/2d/navigation_agent_2d.cpp b/scene/2d/navigation_agent_2d.cpp index 380a684c9b..ed6f3b8020 100644 --- a/scene/2d/navigation_agent_2d.cpp +++ b/scene/2d/navigation_agent_2d.cpp @@ -140,7 +140,7 @@ void NavigationAgent2D::_notification(int p_what) { switch (p_what) { case NOTIFICATION_POST_ENTER_TREE: { // need to use POST_ENTER_TREE cause with normal ENTER_TREE not all required Nodes are ready. - // cannot use READY as ready does not get called if Node is readded to SceneTree + // cannot use READY as ready does not get called if Node is re-added to SceneTree set_agent_parent(get_parent()); set_physics_process_internal(true); diff --git a/scene/3d/navigation_agent_3d.cpp b/scene/3d/navigation_agent_3d.cpp index 5db8611d72..1ffabbb6da 100644 --- a/scene/3d/navigation_agent_3d.cpp +++ b/scene/3d/navigation_agent_3d.cpp @@ -143,7 +143,7 @@ void NavigationAgent3D::_notification(int p_what) { switch (p_what) { case NOTIFICATION_POST_ENTER_TREE: { // need to use POST_ENTER_TREE cause with normal ENTER_TREE not all required Nodes are ready. - // cannot use READY as ready does not get called if Node is readded to SceneTree + // cannot use READY as ready does not get called if Node is re-added to SceneTree set_agent_parent(get_parent()); set_physics_process_internal(true); diff --git a/scene/main/node.cpp b/scene/main/node.cpp index ba75c92c85..52c1df8110 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2135,13 +2135,13 @@ Node *Node::_duplicate(int p_flags, HashMap<const Node *, Node *> *r_duplimap) c } else if ((p_flags & DUPLICATE_USE_INSTANTIATION) && !get_scene_file_path().is_empty()) { Ref<PackedScene> res = ResourceLoader::load(get_scene_file_path()); ERR_FAIL_COND_V(res.is_null(), nullptr); - PackedScene::GenEditState ges = PackedScene::GEN_EDIT_STATE_DISABLED; + PackedScene::GenEditState edit_state = PackedScene::GEN_EDIT_STATE_DISABLED; #ifdef TOOLS_ENABLED if (p_flags & DUPLICATE_FROM_EDITOR) { - ges = PackedScene::GEN_EDIT_STATE_INSTANCE; + edit_state = PackedScene::GEN_EDIT_STATE_INSTANCE; } #endif - node = res->instantiate(ges); + node = res->instantiate(edit_state); ERR_FAIL_COND_V(!node, nullptr); node->set_scene_instance_load_placeholder(get_scene_instance_load_placeholder()); diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index 608d15019e..3006da5309 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -2379,15 +2379,15 @@ Error ResourceFormatSaverText::set_uid(const String &p_path, ResourceUID::ID p_u String local_path = ProjectSettings::get_singleton()->localize_path(p_path); Error err = OK; { - Ref<FileAccess> fo = FileAccess::open(p_path, FileAccess::READ); - if (fo.is_null()) { + Ref<FileAccess> file = FileAccess::open(p_path, FileAccess::READ); + if (file.is_null()) { ERR_FAIL_V(ERR_CANT_OPEN); } ResourceLoaderText loader; loader.local_path = local_path; loader.res_path = loader.local_path; - err = loader.set_uid(fo, p_uid); + err = loader.set_uid(file, p_uid); } if (err == OK) { |