diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 00:03:18 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 00:03:18 +0000 |
commit | f6b8ce31c12a8fd5c969608bfdec0e2e8f1e99c3 (patch) | |
tree | 840cfc698d0c1287ef8802ca9a564ae7abdd0f13 /ipc | |
parent | 9ad77099038a76c96f6c4d162fb0706426215a5f (diff) | |
download | chromium_src-f6b8ce31c12a8fd5c969608bfdec0e2e8f1e99c3.zip chromium_src-f6b8ce31c12a8fd5c969608bfdec0e2e8f1e99c3.tar.gz chromium_src-f6b8ce31c12a8fd5c969608bfdec0e2e8f1e99c3.tar.bz2 |
Pure pedantry: Replace all ".size() == 0" with ".empty()".
BUG=carnitas
TEST=compiles; existing unit tests.
Review URL: http://codereview.chromium.org/6602049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76467 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/ipc_channel_posix.cc | 2 | ||||
-rw-r--r-- | ipc/ipc_message_utils.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc index ee89845..a6b1cb4 100644 --- a/ipc/ipc_channel_posix.cc +++ b/ipc/ipc_channel_posix.cc @@ -86,7 +86,7 @@ class PipeMap { ~PipeMap() { // Shouldn't have left over pipes. - DCHECK(map_.size() == 0); + DCHECK(map_.empty()); } // Lookup a given channel id. Return -1 if not found. diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h index 17941aa0..9c1752d 100644 --- a/ipc/ipc_message_utils.h +++ b/ipc/ipc_message_utils.h @@ -413,7 +413,7 @@ template <> struct ParamTraits<std::vector<unsigned char> > { typedef std::vector<unsigned char> param_type; static void Write(Message* m, const param_type& p) { - if (p.size() == 0) { + if (p.empty()) { m->WriteData(NULL, 0); } else { m->WriteData(reinterpret_cast<const char*>(&p.front()), @@ -439,7 +439,7 @@ template <> struct ParamTraits<std::vector<char> > { typedef std::vector<char> param_type; static void Write(Message* m, const param_type& p) { - if (p.size() == 0) { + if (p.empty()) { m->WriteData(NULL, 0); } else { m->WriteData(&p.front(), static_cast<int>(p.size())); |