X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=GrowingBuffer.cpp;h=b1c5dbc7a1eb2cc96651580b71b9da2560dfcfd9;hb=87c3276013058baf0a606510737ae03ae1c79727;hp=719e793505ea9f6f204d1ffae9d2b7ac02735f6b;hpb=c3ba65b13afaf95a2e7ceadeea384ea32cfa0a22;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);