X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=GrowingBuffer.cpp;h=b1c5dbc7a1eb2cc96651580b71b9da2560dfcfd9;hb=64a9612a017e651bc352939a07768abfdfea905f;hp=719e793505ea9f6f204d1ffae9d2b7ac02735f6b;hpb=b11d90aaee4332e80c2f308113899fddebf2643a;p=ecparse.git diff --git a/GrowingBuffer.cpp b/GrowingBuffer.cpp index 719e793..b1c5dbc 100644 --- a/GrowingBuffer.cpp +++ b/GrowingBuffer.cpp @@ -35,6 +35,10 @@ size_t GrowingBuffer::getSize() { return size; } +size_t GrowingBuffer::getRemaining() { + return limit - position; +} + void GrowingBuffer::seek(size_t position) { this->position = (position > limit) ? limit : position; GlobalSettings::isVerbose() && fprintf(stderr, "[%s:%d] setting position to %d.\n", __FILE__, __LINE__, position);