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

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: 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
henrika_webrtc 2016/02/18 11:54:38 "has been moved from"; what exactly does that mean
kwiberg-webrtc 2016/02/18 12:05:35 That the object has been used as the argument of a
henrika_webrtc 2016/02/18 12:28:19 Fine, would be nice with a more clear (less "lingo
kwiberg-webrtc 2016/02/18 13:12:04 Yes, maybe. But I count 4 mentions of that concept
+ // buffer has been moved from.
kwiberg-webrtc 2016/02/18 11:22:32 Please unit test the "Works even if the buffer has
ossu 2016/02/18 12:00:10 The TestMoveConstruct and TestMoveAssign tests alr
kwiberg-webrtc 2016/02/18 12:05:35 Acknowledged.
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