Fix alignment issues with stack allocated memory allocated as bytes but used to hold other types.
Review URL: http://codereview.appspot.com/4435060/
git-svn-id: http://skia.googlecode.com/svn/trunk@1162 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/include/GrClip.h b/gpu/include/GrClip.h
index 54082b7..717dfe6 100644
--- a/gpu/include/GrClip.h
+++ b/gpu/include/GrClip.h
@@ -22,6 +22,7 @@
#include "GrRect.h"
#include "GrPath.h"
#include "GrTArray.h"
+#include "GrTemplates.h"
class GrClip {
@@ -140,7 +141,7 @@
enum {
kPreAllocElements = 4,
};
- uint8_t fListMemory[sizeof(Element) * kPreAllocElements];
+ GrAlignedSTStorage<kPreAllocElements, Element> fListStorage;
GrTArray<Element> fList;
};
#endif