diff --git a/source/coral/io.cpp b/source/coral/io.cpp index 8a357e6..abbee10 100644 --- a/source/coral/io.cpp +++ b/source/coral/io.cpp @@ -20,13 +20,6 @@ export namespace coral { return {0, this->filled}; } - /** - * Returns the base pointer of the buffer data. - */ - u8 * begin() { - return this->data; - } - /** * Returns the base pointer of the buffer data. */ @@ -34,13 +27,6 @@ export namespace coral { return this->data; } - /** - * Returns the tail pointer of the buffer data. - */ - u8 * end() { - return this->data + this->cursor; - } - /** * Returns the tail pointer of the buffer data. */ @@ -49,7 +35,14 @@ export namespace coral { } /** - * Returns `true` if the buffer has been completely filled with data. + * Returns `true` if the buffer is completely empty of data, otherwise `false`. + */ + bool is_empty() const { + return this->filled == capacity; + } + + /** + * Returns `true` if the buffer has been completely filled with data, otherwise `false`. */ bool is_full() const { return this->filled == capacity;