Ticket #8012 (new Bugs)
Inconsistency in linearize()
|Reported by:||Serge Meynard <serge.meynard@…>||Owned by:||no-maintainer|
|Milestone:||To Be Determined||Component:||circular_buffer|
Assume two equivalent non-empty circular buffers A and B, with A reporting as linearized and B as not linearized. After calling clear() on them, they will both still report the same linearized state as before; the linearized state applies to all buffers, whether empty or not. However, calling linearize() on the non-linearized empty buffer B will not linearize it, which is inconsistent.
One option to fix this would be to automatically linearize a buffer when it becomes empty, but that would force some overhead even in cases where it is unnecessary. A better solution would be to make linearize() work normally even on empty buffers.