abalaji added inline comments.

INLINE COMMENTS

> avaldes wrote in suspendsessionconfig.cpp:45
> something like this?
> 
>   : ActionConfig(parent),
>     m_suspendThenHibernateEnabled(nullptr)

Yeah exactly. So a subtle detail of C++ constructors is any data members which 
are not primitive (like structs class instances) get implicitly initialized 
using their default constructor if they don't have an entry in the initializer 
list. So if you do everything in the constructor body you risk double 
initializing stuff, which is unnecessary overhead. Of course this is not the 
case with primitives like pointers which are just integers behind the scenes, 
so what you have is okay, but just for the sake of consistency, better to make 
use of the initializer list

REPOSITORY
  R122 Powerdevil

BRANCH
  arcpatch-D16425_1

REVISION DETAIL
  https://phabricator.kde.org/D16425

To: avaldes, broulik, ngraham
Cc: jobauer, reverendhomer, meven, soriano, abalaji, graesslin, ngraham, 
plasma-devel, LeGast00n, ericadams, jraleigh, GB_2, ragreen, Pitel, ZrenBot, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart

Reply via email to