From 0bfbbabeed6b53d7aa44f6df9b569e3bacb040e9 Mon Sep 17 00:00:00 2001 From: Ada Christine Date: Sun, 5 Feb 2023 12:51:06 +0000 Subject: remove stale header, add numeric.h, use min --- kc/core/video.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'kc/core/video.c') diff --git a/kc/core/video.c b/kc/core/video.c index ec1edf3..4ee0de9 100644 --- a/kc/core/video.c +++ b/kc/core/video.c @@ -1,6 +1,7 @@ #include #include #include +#include #include /* @@ -305,11 +306,6 @@ int video_putchar(int c) return 0; } -static size_t min_sz(size_t left, size_t right) -{ - return (left < right) ? left : right; -} - static void bitmap_copy(struct video_bitmap *dest, struct video_bitmap *src, struct video_point dest_pos, struct video_rect src_rect) { void * (*copy_func)(void *, const void *, size_t) = memcpy; @@ -335,7 +331,7 @@ static void bitmap_copy(struct video_bitmap *dest, struct video_bitmap *src, str void *dest_addr = pixel_addr(dest, line_pos); void *src_addr = pixel_addr(src, src_line_pos); - copy_func(dest_addr, src_addr, min_sz(dest_stride, src_stride)); + copy_func(dest_addr, src_addr, min(dest_stride, src_stride)); } } -- cgit v1.3.1-1-g115d