[gnome-commander/Implement_CppCheck_suggestions] Use C++11 initialization in GnomeCmdConnectDialog::Private struct



commit 9495f9408347ddbb2c3950a903ddc3e9ff425bb4
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Tue Mar 12 22:50:40 2019 +0100

    Use C++11 initialization in GnomeCmdConnectDialog::Private struct

 src/dialogs/gnome-cmd-con-dialog.cc | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-con-dialog.cc b/src/dialogs/gnome-cmd-con-dialog.cc
index 8cd8ffb2..c101ded9 100644
--- a/src/dialogs/gnome-cmd-con-dialog.cc
+++ b/src/dialogs/gnome-cmd-con-dialog.cc
@@ -59,15 +59,15 @@ struct GnomeCmdConnectDialogClass
 
 struct GnomeCmdConnectDialog::Private
 {
-    string *alias;
+    string *alias {nullptr};
     string uri_str;
 
-    GnomeCmdCon::Authentication auth;
+    GnomeCmdCon::Authentication auth {GnomeCmdCon::SAVE_PERMANENTLY};
 
-    GtkWidget *required_table;
-    GtkWidget *optional_table;
+    GtkWidget *required_table {nullptr};
+    GtkWidget *optional_table {nullptr};
 
-    GtkWidget *type_combo;
+    GtkWidget *type_combo {nullptr};
 
     GtkWidget *alias_entry;
     GtkWidget *uri_entry;
@@ -88,15 +88,6 @@ struct GnomeCmdConnectDialog::Private
 
 inline GnomeCmdConnectDialog::Private::Private()
 {
-    alias = NULL;
-
-    auth = GnomeCmdCon::SAVE_PERMANENTLY;
-
-    required_table = NULL;
-    optional_table = NULL;
-
-    type_combo = NULL;
-
     alias_entry = gtk_entry_new ();
     uri_entry = gtk_entry_new ();
     server_entry = gtk_entry_new ();


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