diff options
Diffstat (limited to 'core/io/image.cpp')
-rw-r--r-- | core/io/image.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/core/io/image.cpp b/core/io/image.cpp index 873eb66f33..c36fa6e45f 100644 --- a/core/io/image.cpp +++ b/core/io/image.cpp @@ -34,7 +34,6 @@ #include "core/io/image_loader.h" #include "core/io/resource_loader.h" #include "core/math/math_funcs.h" -#include "core/os/copymem.h" #include "core/string/print_string.h" #include "core/templates/hash_map.h" @@ -1537,7 +1536,7 @@ void Image::shrink_x2() { uint8_t *w = new_img.ptrw(); const uint8_t *r = data.ptr(); - copymem(w, &r[ofs], new_size); + memcpy(w, &r[ofs], new_size); } width = MAX(width / 2, 1); @@ -1932,7 +1931,7 @@ Error Image::generate_mipmap_roughness(RoughnessChannel p_roughness_channel, con uint8_t* wr = imgdata.ptrw(); - copymem(wr.ptr(), ptr, size); + memcpy(wr.ptr(), ptr, size); wr = uint8_t*(); Ref<Image> im; im.instance(); @@ -1982,7 +1981,7 @@ void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_forma { uint8_t *w = data.ptrw(); - zeromem(w, size); + memset(w, 0, size); } width = p_width; @@ -3295,7 +3294,7 @@ Ref<Image> Image::get_image_from_mipmap(int p_mipamp) const { { uint8_t *wr = new_data.ptrw(); const uint8_t *rd = data.ptr(); - copymem(wr, rd + ofs, size); + memcpy(wr, rd + ofs, size); } Ref<Image> image; @@ -3622,5 +3621,5 @@ Ref<Resource> Image::duplicate(bool p_subresources) const { } void Image::set_as_black() { - zeromem(data.ptrw(), data.size()); + memset(data.ptrw(), 0, data.size()); } |