You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rework Vector_softRemove() and compact() operations
Remove the 'dirty_index' and 'dirty_count' members of Vector object.
Instead, let the callers of the Vector_softRemove() operation track the
'dirtyIndex' and pass it to Vector_compact() when needed.
(The new 'dirtyIndex' local variables are safe to migrate from 'int' to
'size_t' because no negative value is used.)
'dirty_index' is supposed to have shorter lifespan than a Vector
instance, and by removing the member we can reduce object size.
'dirty_count' is redundant and thus removed as well.
A boolean 'isDirty' member is added to a Vector object for ease of
debugging.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
0 commit comments