[gnome-commander/Implement_CppCheck_suggestions: 4/7] Use C++11 initialization in History class



commit 98c28b53233c34fe84b4e2af6a452210a5ecfde2
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Tue Mar 12 14:37:43 2019 +0100

    Use C++11 initialization in History class

 src/history.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/history.h b/src/history.h
index 65d6ef12..687e9cbe 100644
--- a/src/history.h
+++ b/src/history.h
@@ -24,15 +24,15 @@
 class History
 {
     gint max;
-    gboolean is_locked;
+    gboolean is_locked {FALSE};
 
-    GList *pos;
+    GList *pos {NULL};
 
   public:
 
-    GList *ents;
+    GList *ents {NULL};
 
-    explicit History(gint maxHistory): is_locked(FALSE), pos(NULL), ents(NULL) { this->max = maxHistory;}
+    explicit History(gint maxHistory) { max = maxHistory;}
     ~History();
 
     History &operator = (GList *list);


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