bug #369 - Quaternion alignment is broken

The problem was two-fold:
 * missing aligned operator new
 * Flags were mis-computed, the Aligned constant was misused
This commit is contained in:
Benoit Jacob
2011-10-31 09:23:41 -04:00
parent 0609dbeec6
commit 9df2f5c923
2 changed files with 13 additions and 5 deletions

View File

@@ -120,6 +120,10 @@ template<typename Scalar, int Options> void quaternion(void)
VERIFY_IS_APPROX(q1f.template cast<Scalar>(),q1);
Quaternion<double> q1d = q1.template cast<double>();
VERIFY_IS_APPROX(q1d.template cast<Scalar>(),q1);
// test bug 369 - improper alignment.
Quaternionx *q = new Quaternionx;
delete q;
}
template<typename Scalar> void mapQuaternion(void){
@@ -191,7 +195,6 @@ template<typename PlainObjectType> void check_const_correctness(const PlainObjec
VERIFY( !(Map<ConstPlainObjectType, Aligned>::Flags & LvalueBit) );
}
void test_geo_quaternion()
{
for(int i = 0; i < g_repeat; i++) {