Add SeritalIter::skip

This commit is contained in:
JoelKatz
2015-11-10 09:41:53 -08:00
committed by Nik Bougalis
parent 1601f6bbc9
commit c726377012
2 changed files with 14 additions and 0 deletions

View File

@@ -369,6 +369,9 @@ public:
Blob
getVL();
void
skip (int num);
Buffer
getVLBuffer();

View File

@@ -433,6 +433,17 @@ SerialIter::reset() noexcept
used_ = 0;
}
void
SerialIter::skip (int length)
{
if (remain_ < length)
throw std::runtime_error(
"invalid SerialIter skip");
p_ += length;
used_ += length;
remain_ -= length;
}
unsigned char
SerialIter::get8()
{