From a4025fa924b50eb1e51676626f30da8c54a1c34a Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Tue, 13 Aug 2024 12:04:11 +0200 Subject: [PATCH] add more const on local variables --- src/ptk_vk/components.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ptk_vk/components.c b/src/ptk_vk/components.c index f31189c..c2a3f12 100644 --- a/src/ptk_vk/components.c +++ b/src/ptk_vk/components.c @@ -121,10 +121,10 @@ inline bool triangle_intersects(const PtkTriangle t, const PtkPos p) { } inline bool rect_intersects(const PtkRect r, const PtkPos p) { - bool intersects_x = r.top_left.x <= p.x + const bool intersects_x = r.top_left.x <= p.x && r.top_left.x + r.top_left.w >= p.x; - bool intersects_y = r.top_left.y <= p.y + const bool intersects_y = r.top_left.y <= p.y && r.top_left.y + r.top_left.h >= p.y; return intersects_x && intersects_y;