On Fri, Oct 10, 2003 at 10:17:14AM +0000, Angus Leeming wrote: > We have a number of class member functions returning a pointer to a > member variable. It strikes me that the code should usually be like > that below, preventing the pointer itself from being changed. > > I have done this in graphics/PreviewedInset.h and the compiler is > happy enough. Should it be done elsewhere too?
In theory, yes. I don't thing, this is our most urgent problem, though. [If you are at it, you could try to use references where feasible, and maybe the non-const version is not needed in some places.] Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson or B. Franklin or both...)
