Am 18.03.2011 um 21:58 schrieb Andre Poenitz:

> On Fri, Mar 18, 2011 at 09:45:32AM +0100, Jean-Marc Lasgouttes wrote:
>> Le 18/03/2011 02:28, rgh...@lyx.org a écrit :
>>>     availableLV->installEventFilter(this);
>>>     selectedLV->installEventFilter(this);
>>> +   selectedHasFocus_ = false;
>>> }
>> 
>> Thanks. Note that, since this is a constructor, we are supposed to
>> initialize this variable (and the others that predated your change)
>> using the selectedHasFocus_(false) idiom. I am not sure what this
>> buys us, though.
> 
> Nothing in case of simple types, as they won't be zero-initialized
> before entering the constructor body. For complex types it saves
> the cycles for the default-construction.

Plus, AFAIK, const member variables have to be initialized that way.

Stephan

Reply via email to