mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Remove unnecessary assignments
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
This commit is contained in:
parent
aa5b6ed13e
commit
80fb8db31f
19 changed files with 31 additions and 56 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue