On Wednesday 23 of November 2011, Michael Stahl wrote: > hi all, > > i am currently wondering: > in sw, a bunch of classes define serial numbers, e.g. SwIndex, SwNode, etc. > > in a DBG_UTIL build, there is a global counter, and the ctor increments > the counter and assigns its value to a member, so every instance has a > unique serial. > > what is the point of this? how would this help in debugging, given that > the pointer values of the instances ought to be unique as long as they > live?
That is not the case with multiple inheritance, e.g. SwCntntNode does not have SwNode as its first base class (and trying to change that goes horribly wrong). But I myself wouldn't consider that a good reason for keeping the serials. -- Lubos Lunak l.lu...@suse.cz _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice