aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-01-12 14:20:21 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-01-12 14:20:21 +0000
commitf86818b5a6a1e47f95e42c4387c0cda5671b532e (patch)
treea7544fd014a8abf6aacca16c84f3c34278e25812
parent336ad582131f94b9e77c91c83c067dbd0c54c3fc (diff)
bug fix in ei_stack_free
-rw-r--r--Eigen/src/Core/util/Memory.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h
index c16c52dd4..21d9491d3 100644
--- a/Eigen/src/Core/util/Memory.h
+++ b/Eigen/src/Core/util/Memory.h
@@ -229,8 +229,8 @@ inline static int ei_alignmentOffset(const Scalar* ptr, int maxOffset)
#endif
#define ei_aligned_stack_new(TYPE,SIZE) ::new(ei_aligned_stack_alloc(sizeof(TYPE)*SIZE)) TYPE[SIZE]
-#define ei_aligned_stack_delete(TYPE,PTR,SIZE) ei_delete_elements_of_array<TYPE>(PTR, SIZE); \
- ei_aligned_stack_free(PTR,sizeof(TYPE)*SIZE)
+#define ei_aligned_stack_delete(TYPE,PTR,SIZE) do {ei_delete_elements_of_array<TYPE>(PTR, SIZE); \
+ ei_aligned_stack_free(PTR,sizeof(TYPE)*SIZE);} while(0)
/** Qt <= 4.4 has a bug where it calls new(ptr) T instead of ::new(ptr) T.
* This fails as we overload other operator new but not this one. What Qt really means is placement new.