From 64dcc737a016cd41ad9705fb69c905d566813f04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sat, 13 Jun 2026 16:56:53 -0700 Subject: [PATCH] Fixed warnings. (#401) --- src/bounds.cpp | 7 ++++++- src/os.cpp | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/bounds.cpp b/src/bounds.cpp index 6cb0cf6..e6e3781 100644 --- a/src/bounds.cpp +++ b/src/bounds.cpp @@ -2045,7 +2045,12 @@ namespace bx return true; } - const Vec3 pos = closestPoint(plane, hit.pos); + const Vec3 nearest = abs(distance(plane, line.pos) ) <= abs(distance(plane, line.end) ) + ? line.pos + : line.end + ; + + const Vec3 pos = closestPoint(plane, nearest); const Vec3 uvw = barycentric(_triangle, pos); const float nr = -_ty.radius; diff --git a/src/os.cpp b/src/os.cpp index 23c3e7c..be93dd0 100644 --- a/src/os.cpp +++ b/src/os.cpp @@ -372,6 +372,8 @@ namespace bx #else _Exit(_exitCode); #endif // BX_PLATFORM_* + + BX_UNREACHABLE; } namespace