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

Cleaned up some redundant/unused code in xr_object_list #1757

Closed
wants to merge 2 commits into from

Conversation

yohjimane
Copy link
Contributor

No description provided.

@yohjimane yohjimane force-pushed the yohji/fix/xr_object_list branch from d5dd287 to 1462e30 Compare December 20, 2024 23:42
@Xottab-DUTY
Copy link
Member

This code is actually correct, not redundant and it is used for a purpose:
m_primary_crows can be changed during SingleUpdate (it calls UpdateCL on an entity, which can call o_crow, which will add the object to m_primary_crows, possibly resulting in reallocation), which can result in iterators invalidation, making it crash because range-based for contains old iterators.
If it won't reallocate and won't crash, it still will be doing unwanted actions: calling UpdateCL on objects that were just added to m_primary_crows. In original code, this would be done only in the next frame.

@Xottab-DUTY Xottab-DUTY closed this Feb 9, 2025
@Xottab-DUTY Xottab-DUTY reopened this Feb 9, 2025
@Xottab-DUTY Xottab-DUTY closed this Feb 9, 2025
@Xottab-DUTY Xottab-DUTY added the Wontfix Probably, impossible to fix, too hard to fix or it's not our responsibility. label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Wontfix Probably, impossible to fix, too hard to fix or it's not our responsibility.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants