Skip to content

Commit 8020b34

Browse files
committed
Refactor B2WorldOverlapContext constructor to use 'in' modifier for B2ShapeProxy
- Updated `B2WorldOverlapContext` constructor to accept `B2ShapeProxy` by reference using the `in` keyword. - This change avoids unnecessary copying of the `B2ShapeProxy` struct, improving performance.
1 parent ab7824e commit 8020b34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Box2D.NET/B2WorldOverlapContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public struct B2WorldOverlapContext
1212
public B2ShapeProxy proxy;
1313
public object userContext;
1414

15-
public B2WorldOverlapContext(B2World world, b2OverlapResultFcn fcn, in B2QueryFilter filter, B2ShapeProxy proxy, object userContext)
15+
public B2WorldOverlapContext(B2World world, b2OverlapResultFcn fcn, in B2QueryFilter filter, in B2ShapeProxy proxy, object userContext)
1616
{
1717
this.world = world;
1818
this.fcn = fcn;

0 commit comments

Comments
 (0)