summaryrefslogtreecommitdiffstats
path: root/base/pickle.h
diff options
context:
space:
mode:
authormaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-06 20:35:17 +0000
committermaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-06 20:35:17 +0000
commitc9046afea46a4b8252392adced73f3d2a9fb354e (patch)
treec557a80884a379eecf170e3cf88acee77bc4d837 /base/pickle.h
parenta4930c88e7fb14ba66340cbe393fcdf4c668e41c (diff)
downloadchromium_src-c9046afea46a4b8252392adced73f3d2a9fb354e.zip
chromium_src-c9046afea46a4b8252392adced73f3d2a9fb354e.tar.gz
chromium_src-c9046afea46a4b8252392adced73f3d2a9fb354e.tar.bz2
Fix base::DIR_SOURCE_ROOT path calculation.
Add missing header files to base.vcproj. Fix thread local storage implicit destructor call on Windows x64. Fix build compilation issues in x64 with third party headers. Fix Pickle for x64, the header doesn't need to be size_t, uint32 ought to be sufficient for the object. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@450 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/pickle.h')
-rw-r--r--base/pickle.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/base/pickle.h b/base/pickle.h
index 5e97ff5..7c4a007 100644
--- a/base/pickle.h
+++ b/base/pickle.h
@@ -147,9 +147,9 @@ class Pickle {
// not been changed.
void TrimWriteData(int length);
- // payload follows after allocation of Header (header size is customizable)
+ // Payload follows after allocation of Header (header size is customizable).
struct Header {
- size_t payload_size; // specifies the size of the payload
+ uint32 payload_size; // Specifies the size of the payload.
};
// Returns the header, cast to a user-specified type T. The type T must be a
@@ -218,14 +218,14 @@ class Pickle {
bool Resize(size_t new_capacity);
// Aligns 'i' by rounding it up to the next multiple of 'alignment'
- static inline size_t AlignInt(size_t i, int alignment) {
+ static size_t AlignInt(size_t i, int alignment) {
return i + (alignment - (i % alignment)) % alignment;
}
// Moves the iterator by the given number of bytes, making sure it is aligned.
// Pointer (iterator) is NOT aligned, but the change in the pointer
// is guaranteed to be a multiple of sizeof(uint32).
- static inline void UpdateIter(void** iter, int bytes) {
+ static void UpdateIter(void** iter, int bytes) {
*iter = static_cast<char*>(*iter) + AlignInt(bytes, sizeof(uint32));
}