Skip to content

Refactor: Remove 'in' modifier for small ID structs#85

Merged
ikpil merged 1 commit intomainfrom
pr/in-param2
Feb 28, 2026
Merged

Refactor: Remove 'in' modifier for small ID structs#85
ikpil merged 1 commit intomainfrom
pr/in-param2

Conversation

@ikpil
Copy link
Owner

@ikpil ikpil commented Feb 28, 2026

  • Removed in modifier from B2ShapeId, B2BodyId, and B2ContactId parameters in various functions and delegates.
  • These structs are small (8 bytes or less), so passing them by value is more efficient than passing by reference.
  • This change avoids potential pointer indirection overhead and aligns with C# performance best practices for small structs.

- Removed `in` modifier from `B2ShapeId`, `B2BodyId`, and `B2ContactId` parameters in various functions and delegates.
- These structs are small (8 bytes or less), so passing them by value is more efficient than passing by reference.
- This change avoids potential pointer indirection overhead and aligns with C# performance best practices for small structs.
@ikpil ikpil merged commit 5efc96d into main Feb 28, 2026
10 checks passed
@ikpil ikpil mentioned this pull request Feb 28, 2026
@ikpil ikpil deleted the pr/in-param2 branch February 28, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant