diff options
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/base/compound_buffer.cc | 8 | ||||
-rw-r--r-- | remoting/base/tracer.cc | 2 | ||||
-rw-r--r-- | remoting/jingle_glue/jingle_thread.cc | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/remoting/base/compound_buffer.cc b/remoting/base/compound_buffer.cc index a766abe..049ad8e 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; diff --git a/remoting/base/tracer.cc b/remoting/base/tracer.cc index a534deb..ba359d4 100644 --- a/remoting/base/tracer.cc +++ b/remoting/base/tracer.cc @@ -76,7 +76,7 @@ class OutputLogger { wake_.Wait(); } // Check again since we might have woken for a stop signal. - if (buffers_.size() != 0) { + if (!buffers_.empty()) { buffer = buffers_.back(); buffers_.pop_back(); } diff --git a/remoting/jingle_glue/jingle_thread.cc b/remoting/jingle_glue/jingle_thread.cc index b8bc428..9dc3915 100644 --- a/remoting/jingle_glue/jingle_thread.cc +++ b/remoting/jingle_glue/jingle_thread.cc @@ -163,7 +163,7 @@ void JingleThread::OnMessage(talk_base::Message* msg) { // Stop the thread only if there are no more messages left in the queue, // otherwise post another task to try again later. - if (msgq_.size() > 0 || fPeekKeep_) { + if (!msgq_.empty() || fPeekKeep_) { Post(this, kStopMessageId); } else { MessageQueue::Quit(); |