Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


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.lunak@suse.cz

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.