Fix for compilation inder Win64: use uintprt_t for pointer arithmetic for alignment purposes

This commit is contained in:
Emil Martinec
2010-08-06 14:27:19 -05:00
parent ab95e09a68
commit 3c3f88006c
2 changed files with 8 additions and 8 deletions

View File

@@ -27,9 +27,9 @@ template <class T> class AlignedBuffer {
public:
T* data ;
AlignedBuffer (int size, int align=16) {
AlignedBuffer (size_t size, size_t align=16) {
real = new T[size+2*align];
data = (T*)((long)real + (align-((long)real)%align));
data = (T*)((uintptr_t)real + (align-((uintptr_t)real)%align));
}
~AlignedBuffer () {