Split identifier registry#754
Conversation
456a4d7 to
7529de3
Compare
29b35bb to
4d24716
Compare
271eb78 to
3c60608
Compare
3082dc0 to
9bb1f09
Compare
0e8f274 to
d130288
Compare
0a30ebe to
a820285
Compare
46bcaf6 to
4f86b94
Compare
52c7c2c to
e1fe174
Compare
e1fe174 to
8074731
Compare
8074731 to
474c24e
Compare
3ab13fd to
d0d8104
Compare
474c24e to
deb38e1
Compare
7ed3847 to
798a19a
Compare
deb38e1 to
c586288
Compare
Catylist0
left a comment
There was a problem hiding this comment.
Looks fine, definitely agree with splitting out the headers and I don't see any issues with the implementation
c586288 to
3ffae2b
Compare
3ffae2b to
e66998d
Compare
e66998d to
6bac070
Compare
275a00c to
b5021b0
Compare
d67f464 to
1605d1e
Compare
| typename SizeType, | ||
| typename Allocator | ||
| > requires is_strongly_typed<SizeType> | ||
| [[nodiscard]] inline constexpr TypedSpan<SizeType, ValueType> get_values(OwningRegistry<ValueType, SizeType, Allocator>& registry) { |
There was a problem hiding this comment.
You might consider making these implicit conversion operators to avoid having to wrap their use as parameters in get_values, which adds noise. That said, it may be architecturally simpler to move the data into a new location to model locking rather than a flag and check, as it produces simpler code and doesn't require new types. (i.e. you would have a set of variables representing the unlocked state that the code responsible for loading references and would then move the data into new variables once loading is complete. This ensures that any loading functions called erroneously post load simply can't touch the data being used while the game runs. Functions that must be shared between the pre-load-completion and post-load logic can take a reference to the variable set itself so that they can be called on either data set.) A third option would be to create two view types to the same variable set and ensure that the view type used post load provides only const access to the data that must remain fixed. In this approach functions shared between pre-load-completion and post-load logic are accommodated by allowing the view with mutable access to be type cast to the view providing only const access.
1605d1e to
ea17456
Compare
Stacked on top of #758
Goal: reduce headers spreading everywhere, specifically NodeTools.hpp included in IdentifierRegistry.hpp.
Plan: replace IdentifierRegistry.hpp with minimal headers for storage and free functions for searching and modifying.