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

Unified Diff: base/memory/singleton.h

Issue 10796020: Upgrade AlignedMemory to support dynamic allocations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Documentation. Created 8 years, 5 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: base/memory/singleton.h
diff --git a/base/memory/singleton.h b/base/memory/singleton.h
index 4564790722b121fefcd19e4d0b6a587b108c46c0..5b5562b84dbe0185cf05a54f5c17b18779c6fdcc 100644
--- a/base/memory/singleton.h
+++ b/base/memory/singleton.h
@@ -127,12 +127,12 @@ struct StaticMemorySingletonTraits {
}
private:
- static base::AlignedMemory<sizeof(Type), ALIGNOF(Type)> buffer_;
+ static base::AlignedMemory<ALIGNOF(Type), sizeof(Type)> buffer_;
// Signal the object was already deleted, so it is not revived.
static base::subtle::Atomic32 dead_;
};
-template <typename Type> base::AlignedMemory<sizeof(Type), ALIGNOF(Type)>
+template <typename Type> base::AlignedMemory<ALIGNOF(Type), sizeof(Type)>
StaticMemorySingletonTraits<Type>::buffer_;
template <typename Type> base::subtle::Atomic32
StaticMemorySingletonTraits<Type>::dead_ = 0;

Powered by Google App Engine
This is Rietveld 408576698