| Index: base/memory/singleton.h
|
| diff --git a/base/memory/singleton.h b/base/memory/singleton.h
|
| index 5c58d5fe2944cd332980fb39f5dc5e815a48c0d4..d604910024018fe9f980a1b83f99e094570c558e 100644
|
| --- a/base/memory/singleton.h
|
| +++ b/base/memory/singleton.h
|
| @@ -24,7 +24,6 @@
|
| #include "base/base_export.h"
|
| #include "base/logging.h"
|
| #include "base/macros.h"
|
| -#include "base/memory/aligned_memory.h"
|
| #include "base/threading/thread_restrictions.h"
|
|
|
| namespace base {
|
| @@ -115,7 +114,7 @@ struct StaticMemorySingletonTraits {
|
| if (subtle::NoBarrier_AtomicExchange(&dead_, 1))
|
| return NULL;
|
|
|
| - return new(buffer_.void_data()) Type();
|
| + return new (buffer_) Type();
|
| }
|
|
|
| static void Delete(Type* p) {
|
| @@ -130,14 +129,13 @@ struct StaticMemorySingletonTraits {
|
| static void Resurrect() { subtle::NoBarrier_Store(&dead_, 0); }
|
|
|
| private:
|
| - static AlignedMemory<sizeof(Type), ALIGNOF(Type)> buffer_;
|
| + alignas(Type) static char buffer_[sizeof(Type)];
|
| // Signal the object was already deleted, so it is not revived.
|
| static subtle::Atomic32 dead_;
|
| };
|
|
|
| template <typename Type>
|
| -AlignedMemory<sizeof(Type), ALIGNOF(Type)>
|
| - StaticMemorySingletonTraits<Type>::buffer_;
|
| +alignas(Type) char StaticMemorySingletonTraits<Type>::buffer_[sizeof(Type)];
|
| template <typename Type>
|
| subtle::Atomic32 StaticMemorySingletonTraits<Type>::dead_ = 0;
|
|
|
|
|