diff options
author | Sebastian Schuberth <sschuberth@gmail.com> | 2010-07-07 12:39:17 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-07-13 22:26:45 +0000 |
commit | 4efd2ebb27bf0ed2d2a9f472c5b163640be195e6 (patch) | |
tree | 660d0c511fcd95b62aeb74fcc51f3faca4c5a7e6 /src/corelib/io/qsettings_win.cpp | |
parent | 17d6b2d1f02e5f679008d97036befd713025a0f2 (diff) |
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>
Diffstat (limited to 'src/corelib/io/qsettings_win.cpp')
-rw-r--r-- | src/corelib/io/qsettings_win.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/io/qsettings_win.cpp b/src/corelib/io/qsettings_win.cpp index 60b15f41a0..1546219c3b 100644 --- a/src/corelib/io/qsettings_win.cpp +++ b/src/corelib/io/qsettings_win.cpp @@ -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 |