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 ResourceSimpleArray #24

Open
carmineos opened this issue Mar 31, 2021 · 0 comments
Open

Refactor ResourceSimpleArray #24

carmineos opened this issue Mar 31, 2021 · 0 comments

Comments

@carmineos
Copy link
Owner

ResourceSimpleArray currently inherits from ListBase which has a workaround to cache block length.
This actually isn't required as covariance isn't a problem in this case because ResourceSimpleArray is never used with blocks of type IResourceXXSystemBlock or blocks of variable length (except in ShaderParametersBlock_GTA5_pc which uses is temporary but won't use it anymore once IPackedBlock interface is implemented)

This means that we can be sure that block length is always Count * BlockLength of T
We should also consider refactoring all the base collections blocks to implement common .NET collections interfaces.

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

No branches or pull requests

1 participant