pref(png): use lv_memcpy/memset to improve performance
@@ -119,14 +119,12 @@ to something as fast. */
static void lodepng_memcpy(void* LODEPNG_RESTRICT dst,
const void* LODEPNG_RESTRICT src, size_t size) {
- size_t i;
- for(i = 0; i < size; i++) ((char*)dst)[i] = ((const char*)src)[i];
+ lv_memcpy(dst, src, size);
}
static void lodepng_memset(void* LODEPNG_RESTRICT dst,
int value, size_t num) {
- size_t i;
- for(i = 0; i < num; i++) ((char*)dst)[i] = (char)value;
+ lv_memset(dst, value, num);
}
/* does not check memory out of bounds, do not use on untrusted data */
