lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [5840] Initialize all data members in ctor-initializer for


From: Greg Chicares
Subject: [lmi-commits] [5840] Initialize all data members in ctor-initializer for safety
Date: Wed, 20 Nov 2013 17:51:45 +0000

Revision: 5840
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5840
Author:   chicares
Date:     2013-11-20 17:51:44 +0000 (Wed, 20 Nov 2013)
Log Message:
-----------
Initialize all data members in ctor-initializer for safety

Modified Paths:
--------------
    lmi/trunk/main_wx.cpp

Modified: lmi/trunk/main_wx.cpp
===================================================================
--- lmi/trunk/main_wx.cpp       2013-11-20 16:01:10 UTC (rev 5839)
+++ lmi/trunk/main_wx.cpp       2013-11-20 17:51:44 UTC (rev 5840)
@@ -49,7 +49,7 @@
 #include "data_directory.hpp"
 #include "database_document.hpp"
 #include "database_view.hpp"
-#include "dbdict.hpp"               // print_databases()
+#include "dbdict.hpp"                   // print_databases()
 #include "default_view.hpp"
 #include "docmanager_ex.hpp"
 #include "docmdichildframe_ex.hpp"
@@ -61,7 +61,7 @@
 #include "icon_monger.hpp"
 #include "illustration_document.hpp"
 #include "illustration_view.hpp"
-#include "input_sequence_entry.hpp" // InputSequenceEntryXmlHandler
+#include "input_sequence_entry.hpp"     // InputSequenceEntryXmlHandler
 #include "license.hpp"
 #include "main_common.hpp"
 #include "mec_document.hpp"
@@ -77,14 +77,14 @@
 #include "progress_meter.hpp"
 #include "rounding_document.hpp"
 #include "rounding_view.hpp"
-#include "rounding_view_editor.hpp" // RoundingButtonsXmlHandler
+#include "rounding_view_editor.hpp"     // RoundingButtonsXmlHandler
 #include "system_command.hpp"
 #include "text_doc.hpp"
 #include "text_view.hpp"
 #include "tier_document.hpp"
 #include "tier_view.hpp"
 #include "wx_new.hpp"
-#include "wx_utility.hpp"           // class ClipboardEx
+#include "wx_utility.hpp"               // class ClipboardEx
 
 #include <boost/filesystem/operations.hpp>
 #include <boost/filesystem/path.hpp>
@@ -94,12 +94,12 @@
 #include <wx/cshelp.h>
 #include <wx/docmdi.h>
 #include <wx/image.h>
-#include <wx/log.h>                 // wxSafeShowMessage()
+#include <wx/log.h>                     // wxSafeShowMessage()
 #include <wx/menu.h>
 #include <wx/textctrl.h>
-#include <wx/textdlg.h>             // wxGetTextFromUser()
+#include <wx/textdlg.h>                 // wxGetTextFromUser()
 #include <wx/toolbar.h>
-#include <wx/utils.h>               // wxMilliSleep(), wxSafeYield()
+#include <wx/utils.h>                   // wxMilliSleep(), wxSafeYield()
 #include <wx/xrc/xmlres.h>
 
 #include <iterator>
@@ -225,9 +225,9 @@
     return result;
 }
 
-/// 'config_' can't be initialized in the initializer list, because
-/// wxConfigBase::Get() must be called after SetAppName() and
-/// SetVendorName(). Otherwise, the configuration object wouldn't
+/// 'config_' can't be initialized in the initializer list with
+/// wxConfigBase::Get(), which must be called after SetAppName() and
+/// SetVendorName(): otherwise, the configuration object wouldn't
 /// reflect the vendor and application name; on the msw platform,
 /// for instance, that would prevent writing to a registry key based
 /// on the application's name.
@@ -242,7 +242,8 @@
 ///     the "AppName" (but not the "AppDisplayName").
 
 Skeleton::Skeleton()
-    :doc_manager_     (0)
+    :config_          (0)
+    ,doc_manager_     (0)
     ,frame_           (0)
     ,timer_           (this)
 {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]