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

Unified Diff: remoting/base/compound_buffer.cc

Issue 6609008: Change other usages of .size() to .empty() when applicable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter nits Created 9 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 | « ppapi/proxy/serialized_var.cc ('k') | remoting/base/tracer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/compound_buffer.cc
diff --git a/remoting/base/compound_buffer.cc b/remoting/base/compound_buffer.cc
index a766abe83dfbe91800d906f909b8520cdf998106..049ad8e5bc58690159f09f2a879efe519a9c6ae4 100644
--- a/remoting/base/compound_buffer.cc
+++ b/remoting/base/compound_buffer.cc
@@ -99,11 +99,11 @@ void CompoundBuffer::CropFront(int bytes) {
}
total_bytes_ -= bytes;
- while (chunks_.size() > 0 && chunks_.front().size <= bytes) {
+ while (!chunks_.empty() && chunks_.front().size <= bytes) {
bytes -= chunks_.front().size;
chunks_.pop_front();
}
- if (chunks_.size() > 0 && bytes > 0) {
+ if (!chunks_.empty() && bytes > 0) {
chunks_.front().start += bytes;
chunks_.front().size -= bytes;
DCHECK_GT(chunks_.front().size, 0);
@@ -121,11 +121,11 @@ void CompoundBuffer::CropBack(int bytes) {
}
total_bytes_ -= bytes;
- while (chunks_.size() > 0 && chunks_.back().size <= bytes) {
+ while (!chunks_.empty() && chunks_.back().size <= bytes) {
bytes -= chunks_.back().size;
chunks_.pop_back();
}
- if (chunks_.size() > 0 && bytes > 0) {
+ if (!chunks_.empty() && bytes > 0) {
chunks_.back().size -= bytes;
DCHECK_GT(chunks_.back().size, 0);
bytes = 0;
« no previous file with comments | « ppapi/proxy/serialized_var.cc ('k') | remoting/base/tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698