bug #1333: fix bad usage of const_cast_derived. Better use .data() for that purpose.

This commit is contained in:
Gael Guennebaud 2016-10-24 22:22:35 +02:00
parent 9e8f07d7b5
commit 2634f9386c

View File

@ -624,7 +624,7 @@ struct first_aligned_impl<Alignment, Derived, false>
{
static inline Index run(const Derived& m)
{
return internal::first_aligned<Alignment>(&m.const_cast_derived().coeffRef(0,0), m.size());
return internal::first_aligned<Alignment>(m.data(), m.size());
}
};