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 From d4aeabeac0a8bd1665b14aacf487df17198c1ab9 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 12 May 2020 21:40:41 +0200 Subject: Fixing/refactoring ft_getline, fixed/normed ft_memchr, added ft_strmove --- src/mem/ft_memcpy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/mem/ft_memcpy.c') diff --git a/src/mem/ft_memcpy.c b/src/mem/ft_memcpy.c index 1f84bfd..699111f 100644 --- a/src/mem/ft_memcpy.c +++ b/src/mem/ft_memcpy.c @@ -6,11 +6,10 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/10/07 10:00:07 by cacharle #+# #+# */ -/* Updated: 2020/01/17 10:39:04 by cacharle ### ########.fr */ +/* Updated: 2020/05/12 20:49:35 by charles ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" #include "libft_mem.h" void *ft_memcpy(void *dest, const void *src, size_t n) -- cgit