Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor access patterns of UnsafeWorldCell #12214

Open
alice-i-cecile opened this issue Feb 29, 2024 · 0 comments
Open

Refactor access patterns of UnsafeWorldCell #12214

alice-i-cecile opened this issue Feb 29, 2024 · 0 comments
Labels
A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change D-Complex Quite challenging from either a design or technical perspective. Ask for help!

Comments

@alice-i-cecile
Copy link
Member

alice-i-cecile commented Feb 29, 2024

Not super comfortable with this, since the rest of UnsafeWorldCell's method don't use or respect this memory access pattern (world_mut is a special case). They just create and encapsulate &World references and provide restricted access. It's fine for now though since it's private and unsafe, but I think we should refactor the rest of UnsafeWorldCell to use this memory access pattern, and probably remove world_metadata since it's possible to access metadata safely through provided methods.

Originally posted by @JoJoJet in #10756 (comment)

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change D-Complex Quite challenging from either a design or technical perspective. Ask for help! labels Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change D-Complex Quite challenging from either a design or technical perspective. Ask for help!
Projects
None yet
Development

No branches or pull requests

1 participant