1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-29 16:47:45 +00:00

AK: Add CircularBuffer

The class is very similar to `CircularDuplexStream` in its behavior.
Main differences are that `CircularBuffer`:
 - does not inherit from `AK::Stream`
 - uses `ErrorOr` for its API
 - is heap allocated (and OOM-Safe)

 This patch also add some tests.
This commit is contained in:
Lucas CHOLLET 2022-12-08 22:44:46 +01:00 committed by Andrew Kaster
parent 3454891d38
commit f12e81b74a
6 changed files with 488 additions and 0 deletions

View file

@ -1,6 +1,7 @@
set(AK_SOURCES
Assertions.cpp
Base64.cpp
CircularBuffer.cpp
DeprecatedString.cpp
FloatingPointStringConversions.cpp
FlyString.cpp