Previously the base virtual array implementation optimized for
common cases where data is stored as spans or single values.
However, that didn't make sense when there are already
sub-classes that handle those cases specifically. Instead
implement the faster materialize methods for each base class.
Now, if the base class is reached, it means no optimizations
for avoiding virtual function call overhead are used.
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
Event Timeline
Comment Actions
The span constness part can be committed already.
| source/blender/blenlib/BLI_virtual_array.hh | ||
|---|---|---|
| 165 | I actually meant to do the opposite at some point: Removing the special cases from VArrayImpl and only implementing them in the corresponding subclasses. Do you see a strong reason for having everything in the base class? | |
| source/blender/blenlib/BLI_virtual_array.hh | ||
|---|---|---|
| 165 | Nope! Only consistency, but I agree it would be better like you suggested. I can implement that here if you'd like | |
| source/blender/blenlib/BLI_virtual_array.hh | ||
|---|---|---|
| 165 | Sounds good. | |