summaryrefslogtreecommitdiffstats
path: root/editor/plugins/canvas_item_editor_plugin.cpp
diff options
context:
space:
mode:
authorWilson E. Alvarez <wilson.e.alvarez@rubonnek.com>2023-12-13 11:06:14 -0500
committerWilson E. Alvarez <wilson.e.alvarez@rubonnek.com>2023-12-13 11:06:26 -0500
commit80fb8db31ff3c5bebf66f18247df8f58fddfb95f (patch)
tree255267fdfe64d6345a3a3462b9847a9a1e6cac72 /editor/plugins/canvas_item_editor_plugin.cpp
parentaa5b6ed13e4644633baf2a8a1384c82e91c533a1 (diff)
downloadredot-engine-80fb8db31ff3c5bebf66f18247df8f58fddfb95f.tar.gz
Remove unnecessary assignments
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Diffstat (limited to 'editor/plugins/canvas_item_editor_plugin.cpp')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 85846d7bc6..bac2a4909f 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -5613,8 +5613,7 @@ void CanvasItemEditorViewport::_on_change_type_closed() {
void CanvasItemEditorViewport::_create_preview(const Vector<String> &files) const {
bool add_preview = false;
for (int i = 0; i < files.size(); i++) {
- String path = files[i];
- Ref<Resource> res = ResourceLoader::load(path);
+ Ref<Resource> res = ResourceLoader::load(files[i]);
ERR_FAIL_COND(res.is_null());
Ref<Texture2D> texture = Ref<Texture2D>(Object::cast_to<Texture2D>(*res));
Ref<PackedScene> scene = Ref<PackedScene>(Object::cast_to<PackedScene>(*res));