summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 21:03:47 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 21:03:47 +0000
commit6775e40aeb887f15dc9182b250cdc4100aa79ce0 (patch)
tree858e3064689861a9ad85975154ce653418aaf3d8 /remoting
parent5bd8d1716b3f27664348c7fcb2c33f2e3a4573a7 (diff)
downloadchromium_src-6775e40aeb887f15dc9182b250cdc4100aa79ce0.zip
chromium_src-6775e40aeb887f15dc9182b250cdc4100aa79ce0.tar.gz
chromium_src-6775e40aeb887f15dc9182b250cdc4100aa79ce0.tar.bz2
Change other usages of .size() to .empty() when applicable.
BUG=carnitas TEST=compiles Review URL: http://codereview.chromium.org/6609008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76962 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/base/compound_buffer.cc8
-rw-r--r--remoting/base/tracer.cc2
-rw-r--r--remoting/jingle_glue/jingle_thread.cc2
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();