Index: base/pickle.cc |
diff --git a/base/pickle.cc b/base/pickle.cc |
index f6ed4cc4c7f3550a190c4918c5fc7030916c3033..aac59df34336ca006528ee638b33102180ced0f9 100644 |
--- a/base/pickle.cc |
+++ b/base/pickle.cc |
@@ -144,6 +144,20 @@ bool Pickle::ReadSize(void** iter, size_t* result) const { |
return true; |
} |
+bool Pickle::ReadUInt32(void** iter, uint32* result) const { |
Amanda Walker
2008/12/26 22:06:37
we're ending up with a lot of copies of this funct
|
+ DCHECK(iter); |
+ if (!*iter) |
+ *iter = const_cast<char*>(payload()); |
+ |
+ if (!IteratorHasRoomFor(*iter, sizeof(*result))) |
+ return false; |
+ |
+ memcpy(result, *iter, sizeof(*result)); |
+ |
+ UpdateIter(iter, sizeof(*result)); |
+ return true; |
+} |
+ |
bool Pickle::ReadInt64(void** iter, int64* result) const { |
DCHECK(iter); |
if (!*iter) |