From 6448b7ee7c32ee8ad3c406643988f93ce762f323 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Tue, 23 Jan 2024 19:07:35 +0200 Subject: [PATCH] Remove unnecessary Array casting in DrawingAlgos --- src/Autoload/DrawingAlgos.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Autoload/DrawingAlgos.gd b/src/Autoload/DrawingAlgos.gd index 7ceac387a..4b989b347 100644 --- a/src/Autoload/DrawingAlgos.gd +++ b/src/Autoload/DrawingAlgos.gd @@ -21,7 +21,7 @@ func blend_layers( # the second are the opacities and the third are the origins var metadata_image := Image.create(project.layers.size(), 3, false, Image.FORMAT_R8) var frame_index := project.frames.find(frame) - var previous_ordered_layers: Array[int] = Array(project.ordered_layers) + var previous_ordered_layers: Array[int] = project.ordered_layers project.order_layers(frame_index) for i in project.layers.size(): var ordered_index := project.ordered_layers[i] @@ -53,7 +53,7 @@ func blend_layers( gen.generate_image(blended, blend_layers_shader, params, project.size) image.blend_rect(blended, Rect2i(Vector2i.ZERO, project.size), origin) # Re-order the layers again to ensure correct canvas drawing - project.ordered_layers = Array(previous_ordered_layers) + project.ordered_layers = previous_ordered_layers ## Algorithm based on http://members.chello.at/easyfilter/bresenham.html