summaryrefslogtreecommitdiff
path: root/modules/noise/noise_texture_2d.cpp
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-07-22 20:06:19 +0200
committerkobewi <kobewi4e@gmail.com>2022-10-14 14:34:15 +0200
commit072f6feabac70a6c4ed1a16f4e983bf31ad62d50 (patch)
tree6df3f7297a4af9799c1f6bc88e5c633235246362 /modules/noise/noise_texture_2d.cpp
parent39534a7aecc4ca4215af67244b23dda09ea339f8 (diff)
Make some Image methods static
Diffstat (limited to 'modules/noise/noise_texture_2d.cpp')
-rw-r--r--modules/noise/noise_texture_2d.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/noise/noise_texture_2d.cpp b/modules/noise/noise_texture_2d.cpp
index 23d60c4866..8c785d7591 100644
--- a/modules/noise/noise_texture_2d.cpp
+++ b/modules/noise/noise_texture_2d.cpp
@@ -176,9 +176,7 @@ Ref<Image> NoiseTexture2D::_modulate_with_gradient(Ref<Image> p_image, Ref<Gradi
int width = p_image->get_width();
int height = p_image->get_height();
- Ref<Image> new_image;
- new_image.instantiate();
- new_image->create(width, height, false, Image::FORMAT_RGBA8);
+ Ref<Image> new_image = Image::create_empty(width, height, false, Image::FORMAT_RGBA8);
for (int row = 0; row < height; row++) {
for (int col = 0; col < width; col++) {