From 630428dc31405e860b67bf6bdfb3896776dc98c2 Mon Sep 17 00:00:00 2001 From: SirLynix Date: Fri, 17 Mar 2023 19:23:23 +0100 Subject: [PATCH] Physics2D/PhysWorld2D: Fix crash introduced in 488f3ca6efb5d61c1fff2bc99cea920f1bc7c33d --- src/Nazara/Physics2D/PhysWorld2D.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Nazara/Physics2D/PhysWorld2D.cpp b/src/Nazara/Physics2D/PhysWorld2D.cpp index dc2d721b0..5bea6e163 100644 --- a/src/Nazara/Physics2D/PhysWorld2D.cpp +++ b/src/Nazara/Physics2D/PhysWorld2D.cpp @@ -205,7 +205,7 @@ namespace Nz void PhysWorld2D::RaycastQuery(const Vector2f& from, const Vector2f& to, float radius, UInt32 collisionGroup, UInt32 categoryMask, UInt32 collisionMask, const FunctionRef& callback) { - using CallbackType = const std::function; + using CallbackType = std::remove_reference_t; auto cpCallback = [](cpShape* shape, cpVect point, cpVect normal, cpFloat alpha, void* data) { @@ -280,7 +280,7 @@ namespace Nz void PhysWorld2D::RegionQuery(const Rectf& boundingBox, UInt32 collisionGroup, UInt32 categoryMask, UInt32 collisionMask, const FunctionRef& callback) { - using CallbackType = const std::function; + using CallbackType = std::remove_reference_t; auto cpCallback = [](cpShape* shape, void* data) {