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

Unified Diff: ipc/ipc_message_utils.h

Issue 6602049: Pure pedantry: Replace all ".size() == 0" with ".empty()". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: ipc/ipc_message_utils.h
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
index 17941aa0b00e900a9e91ed105c21849664ec9a91..9c1752de4d1219224645b7b3fa6a6dbfa8a57e2d 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()));

Powered by Google App Engine
This is Rietveld 408576698