| Index: base/memory/aligned_memory.h
|
| diff --git a/base/memory/aligned_memory.h b/base/memory/aligned_memory.h
|
| index 1a4cba9ad8450d72d1a31ff93f6660b19459d748..bb7bd872cfb039a754107a94897131785e29be4d 100644
|
| --- a/base/memory/aligned_memory.h
|
| +++ b/base/memory/aligned_memory.h
|
| @@ -34,8 +34,10 @@
|
| #ifndef BASE_MEMORY_ALIGNED_MEMORY_H_
|
| #define BASE_MEMORY_ALIGNED_MEMORY_H_
|
|
|
| +#include <stddef.h>
|
| +#include <stdint.h>
|
| +
|
| #include "base/base_export.h"
|
| -#include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
|
|
| #if defined(COMPILER_MSVC)
|
| @@ -51,25 +53,26 @@ namespace base {
|
| template <size_t Size, size_t ByteAlignment>
|
| struct AlignedMemory {};
|
|
|
| -#define BASE_DECL_ALIGNED_MEMORY(byte_alignment) \
|
| - template <size_t Size> \
|
| - class AlignedMemory<Size, byte_alignment> { \
|
| - public: \
|
| - ALIGNAS(byte_alignment) uint8 data_[Size]; \
|
| - void* void_data() { return static_cast<void*>(data_); } \
|
| - const void* void_data() const { \
|
| - return static_cast<const void*>(data_); \
|
| - } \
|
| - template<typename Type> \
|
| - Type* data_as() { return static_cast<Type*>(void_data()); } \
|
| - template<typename Type> \
|
| - const Type* data_as() const { \
|
| - return static_cast<const Type*>(void_data()); \
|
| - } \
|
| - private: \
|
| - void* operator new(size_t); \
|
| - void operator delete(void*); \
|
| - }
|
| +#define BASE_DECL_ALIGNED_MEMORY(byte_alignment) \
|
| + template <size_t Size> \
|
| + class AlignedMemory<Size, byte_alignment> { \
|
| + public: \
|
| + ALIGNAS(byte_alignment) uint8_t data_[Size]; \
|
| + void* void_data() { return static_cast<void*>(data_); } \
|
| + const void* void_data() const { return static_cast<const void*>(data_); } \
|
| + template <typename Type> \
|
| + Type* data_as() { \
|
| + return static_cast<Type*>(void_data()); \
|
| + } \
|
| + template <typename Type> \
|
| + const Type* data_as() const { \
|
| + return static_cast<const Type*>(void_data()); \
|
| + } \
|
| + \
|
| + private: \
|
| + void* operator new(size_t); \
|
| + void operator delete(void*); \
|
| + }
|
|
|
| // Specialization for all alignments is required because MSVC (as of VS 2008)
|
| // does not understand ALIGNAS(ALIGNOF(Type)) or ALIGNAS(template_param).
|
|
|