Skip to content

Commit

Permalink
Fix const-nes of CastRayArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
LPGhatguy committed May 14, 2024
1 parent bc6d651 commit 28b6206
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions JoltC/Functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -771,9 +771,9 @@ typedef struct JPC_NarrowPhaseQuery JPC_NarrowPhaseQuery;
typedef struct JPC_NarrowPhaseQuery_CastRayArgs {
JPC_RRayCast Ray;
JPC_RayCastResult Result;
JPC_BroadPhaseLayerFilter *BroadPhaseLayerFilter;
JPC_ObjectLayerFilter *ObjectLayerFilter;
JPC_BodyFilter *BodyFilter;
const JPC_BroadPhaseLayerFilter *BroadPhaseLayerFilter;
const JPC_ObjectLayerFilter *ObjectLayerFilter;
const JPC_BodyFilter *BodyFilter;
} JPC_NarrowPhaseQuery_CastRayArgs;

JPC_API bool JPC_NarrowPhaseQuery_CastRay(const JPC_NarrowPhaseQuery* self, JPC_NarrowPhaseQuery_CastRayArgs* args);
Expand Down
6 changes: 3 additions & 3 deletions JoltC/JoltC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1424,9 +1424,9 @@ JPC_API void JPC_BodyInterface_InvalidateContactCache(JPC_BodyInterface *self, J
JPC_API bool JPC_NarrowPhaseQuery_CastRay(const JPC_NarrowPhaseQuery* self, JPC_NarrowPhaseQuery_CastRayArgs* args) {
JPH::RayCastResult result;

JPC_BroadPhaseLayerFilterBridge* bplFilter = to_jph(args->BroadPhaseLayerFilter);
JPC_ObjectLayerFilterBridge* olFilter = to_jph(args->ObjectLayerFilter);
JPC_BodyFilterBridge* bodyFilter = to_jph(args->BodyFilter);
const JPC_BroadPhaseLayerFilterBridge* bplFilter = to_jph(args->BroadPhaseLayerFilter);
const JPC_ObjectLayerFilterBridge* olFilter = to_jph(args->ObjectLayerFilter);
const JPC_BodyFilterBridge* bodyFilter = to_jph(args->BodyFilter);

bool hit = to_jph(self)->CastRay(
to_jph(args->Ray),
Expand Down

0 comments on commit 28b6206

Please sign in to comment.