[bt-devel] Serious Bug

'Kang Sun' k486 at digizip.com
Thu Feb 11 10:29:40 MST 2010


Something from google c++ code guidelines...

    When redefining an inherited virtual function, explicitly declare it 
    virtual in the declaration of the derived class. Rationale: If 
    virtual is omitted, the reader has to check all ancestors of the 
    class in question to determine if the function is virtual or not.

Sure, there is a slight overhead of an extra pointer, but in a Qt 
environment, this isn't a big deal since there is so much Qt overhead 
already and these classes are big already.

* Eeli Kaikkonen <eekaikko at mail.student.oulu.fi> wrote on [2010/02/11 07:42]:
> On Thu, 11 Feb 2010, Martin Gruner wrote:
> 
> > Gary, Eeli, Jaak,
> >
> > thanks! This is one of the things I see as a weakness of C++. The inheritance
> > is not explicit for virtual functions.
> 
> I agree completely, though I also agree with Jaak about the
> documentation which we should use to patch the weaknesses of C++.
> 
> Anyways, maybe we should avoid refactoring and optimization in the end
> of the release cycle. If those changes had been done in the beta phase
> they could have gone unnoticed.
> 
> I also have said that optimization for optimization's sake is bad. All
> optimizations should be either trivial and leading to more
> understandable code or be backed up by hard evidence of being critical
> for actual use cases. We have some weak points in the processor and
> memory usage but they won't go away with casual refactoring.



More information about the bt-devel mailing list