From c128213daa677d548bfc2905496257fe4a4faf79 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 11 Mar 2020 21:07:32 +0100 Subject: ft_mem* and ft_strlen optimization --- src/mem/ft_memcpy.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mem/ft_memcpy.c') diff --git a/src/mem/ft_memcpy.c b/src/mem/ft_memcpy.c index d0ef008..1f84bfd 100644 --- a/src/mem/ft_memcpy.c +++ b/src/mem/ft_memcpy.c @@ -11,18 +11,19 @@ /* ************************************************************************** */ #include "libft.h" +#include "libft_mem.h" void *ft_memcpy(void *dest, const void *src, size_t n) { - long int *long_dest; - const long int *long_src; + uint64_t *long_dest; + const uint64_t *long_src; if (dest == src) return (dest); while (n % 8 > 0) { n--; - ((t_ftbyte*)dest)[n] = ((t_ftbyte*)src)[n]; + ((uint8_t*)dest)[n] = ((uint8_t*)src)[n]; } long_dest = dest; long_src = src; -- cgit