Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: webrtc/base/buffer.h

Issue 1707693002: Changed the semantics of Buffer::Clear to not alter the capacity (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@noogle-encode
Patch Set: Rebase onto correct branch. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/base/buffer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/buffer.h
diff --git a/webrtc/base/buffer.h b/webrtc/base/buffer.h
index 5c9380afee03a5e0825d92475e9ed578244314ae..234039607a1c862aa11763936ec236380d3252c5 100644
--- a/webrtc/base/buffer.h
+++ b/webrtc/base/buffer.h
@@ -180,12 +180,10 @@ class Buffer {
return std::move(*this);
}
- // Resets the buffer to zero size and capacity. Works even if the buffer has
- // been moved from.
+ // Resets the buffer to zero size without altering capacity. Works even if the
+ // buffer has been moved from.
void Clear() {
- data_.reset();
size_ = 0;
- capacity_ = 0;
assert(IsConsistent());
}
« no previous file with comments | « no previous file | webrtc/base/buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698