base: Rewrite the CircleBuf to fix bugs and add serialization

The CircleBuf class has at least one bug causing it to overwrite the
wrong elements when wrapping. The current code has a lot of unused
functionality and duplicated code. This changeset replaces the old
implementation with a new version that supports serialization and
arbitrary types in the buffer (not just char).
This commit is contained in:
Andreas Sandberg
2015-08-07 09:59:19 +01:00
parent 39d8034475
commit 9b2426ecfc
8 changed files with 382 additions and 328 deletions

View File

@@ -34,7 +34,7 @@ Source('unittest.cc')
UnitTest('bituniontest', 'bituniontest.cc')
UnitTest('bitvectest', 'bitvectest.cc')
UnitTest('circletest', 'circletest.cc')
UnitTest('circlebuf', 'circlebuf.cc')
UnitTest('cprintftest', 'cprintftest.cc')
UnitTest('cprintftime', 'cprintftest.cc')
UnitTest('fbtest', 'fbtest.cc')