2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-01 06:25:34 +00:00

[2369] Add InputSource::compact() method

This commit is contained in:
Mukund Sivaraman
2012-10-31 10:53:31 +05:30
parent 9843e33b58
commit 51e26dc96b
3 changed files with 106 additions and 0 deletions

View File

@@ -102,6 +102,17 @@ InputSource::ungetAll() {
at_eof_ = false;
}
void
InputSource::compact() {
if (buffer_pos_ == buffer_.size()) {
buffer_.clear();
} else {
buffer_.erase(buffer_.begin() + buffer_pos_);
}
buffer_pos_ = 0;
}
} // namespace master_lexer_internal
} // namespace dns
} // namespace isc