add more const on local variables

This commit is contained in:
jacekpoz 2024-08-13 12:04:11 +02:00
parent c7386ddfbf
commit a4025fa924
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8

View file

@ -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;