Angus Leeming <[EMAIL PROTECTED]> writes:

| Martin Vermeer wrote:
>>> > +        bool display() const { return false; }
>
>>> Why do you need these? The function defaults to false (inset.h).
>
>> ... but these inherit from InsetCommand, which sets it to true
>> (correctly for most of its heirs).
>
| I'm pretty sure that this is bad practice. What I can say for certain 
| is that you'll definitely end up confusing me if you keep changing 
| the default value of the return of a virtual method as you go down 
| the inheritence tree.
>
| I'd much prefer
|         virtual bool InsetOld::display() const { return false; }
| and then
|         virtual bool InsetXYZ::display() const { return true; }
| only for those insets that do actually want it.

yes. _OR_ make dispaly a pure virutal function and only define it for
"leaf" classes.

-- 
        Lgb

Reply via email to