On Sun, Nov 02, 2008 at 04:13:36PM +0000, Garth N. Wells wrote:
I spent some time tracking down a nasty bug related to cont_cast in
Mesh::init. The flag Mesh::_ordered was being reset despite the mesh
being const. Can we avoid this const_cast, or at least move the
const_cast up from the internals of Mesh so it is somewhat clearer that
const-ness is being cast away?
Garth
The init() function is the only place where we should have a
const_cast in the Mesh.
It should not reset the _ordered flag. The init() function may
potentially compute new connectivity (which existed before but was not
computed) but the new connectivity should always be ordered. I'm not
sure it is but we should make sure it is.