Commit 8597900f authored by Giuseppe Ottaviano's avatar Giuseppe Ottaviano Committed by Facebook GitHub Bot

Remove IOBufQueue::clear()

Summary: All usages in fbsource have been removed.

Reviewed By: yfeldblum, philippv

Differential Revision: D33007671

fbshipit-source-id: 74c5f2dad098c6b7cf7085aa1a2e01a48fa81781
parent 6e2d12f8
......@@ -395,19 +395,6 @@ std::unique_ptr<folly::IOBuf> IOBufQueue::pop_front() {
return retBuf;
}
void IOBufQueue::clear() {
if (!head_) {
return;
}
auto guard = updateGuard();
IOBuf* buf = head_.get();
do {
buf->clear();
buf = buf->next();
} while (buf != head_.get());
chainLength_ = 0;
}
void IOBufQueue::clearAndTryReuseLargestBuffer() {
auto guard = updateGuard();
std::unique_ptr<folly::IOBuf> best;
......
......@@ -517,17 +517,6 @@ class IOBufQueue {
const Options& options() const { return options_; }
/**
* Clear the queue. Note that this does not release the buffers, it
* just sets their length to zero; useful if you want to reuse the
* same queue without reallocating.
*
* DEPRECATED: If the queue is chained, only the last buffer will actually be
* reused. In most cases, reset() should be used instead, or if reuse is
* intended, clearAndTryReuseLargestBuffer().
*/
void clear();
/**
* Clear the queue, freeing all the buffers. Options are preserved.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment