Discussion:
r37945 - lyx-devel/trunk/src/frontends/qt4
(too old to reply)
Jean-Marc Lasgouttes
2011-03-19 10:43:42 UTC
Permalink
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.
This makes a lot of sense. Thanks.

JMarc
Stephan Witt
2011-03-19 11:16:28 UTC
Permalink
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

Loading...