RegistryKey: Move member variable initialization to the ctor-init-list
In cause of doubt this is more efficient, see https://isocpp.org/wiki/faq/ctors#init-lists This also fixes the initialization order to match the declarartion order of the variables in the class which some versions of GCC otherwise would complain about. Change-Id: I642f7156d624c2c65f2f3525d813f5289c092f96 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
17d6b2d1f0
commit
4efd2ebb27
|
|
@ -319,11 +319,11 @@ private:
|
|||
};
|
||||
|
||||
RegistryKey::RegistryKey(HKEY parent_handle, const QString &key, bool read_only)
|
||||
: m_parent_handle(parent_handle),
|
||||
m_handle(0),
|
||||
m_key(key),
|
||||
m_read_only(read_only)
|
||||
{
|
||||
m_parent_handle = parent_handle;
|
||||
m_handle = 0;
|
||||
m_read_only = read_only;
|
||||
m_key = key;
|
||||
}
|
||||
|
||||
QString RegistryKey::key() const
|
||||
|
|
|
|||
Loading…
Reference in New Issue