From: Maxim Mamontov <faust@gts.dp.ua>
Date: Tue, 7 Dec 2010 16:02:25 +0000 (+0200)
Subject: Реализована инициализация членов главного класса плагина конфигуратора
X-Git-Tag: 2.407-rc3~325
X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/d241c425d3655cfdf0c9bc7b40150cad9df67707?ds=inline

Реализована инициализация членов главного класса плагина конфигуратора
через список инициализации его конструктора
---

diff --git a/projects/stargazer/plugins/configuration/sgconfig/stgconfig.cpp b/projects/stargazer/plugins/configuration/sgconfig/stgconfig.cpp
index 8ba4b0ff..d2ad12b7 100644
--- a/projects/stargazer/plugins/configuration/sgconfig/stgconfig.cpp
+++ b/projects/stargazer/plugins/configuration/sgconfig/stgconfig.cpp
@@ -84,7 +84,7 @@ port = p;
 return 0;
 }
 //-----------------------------------------------------------------------------
-uint16_t STG_CONFIG_SETTINGS::GetPort()
+uint16_t STG_CONFIG_SETTINGS::GetPort() const
 {
 return port;
 }
@@ -104,9 +104,14 @@ return "Stg configurator v.0.08";
 }
 //-----------------------------------------------------------------------------
 STG_CONFIG::STG_CONFIG()
+    : nonstop(false),
+      isRunning(false),
+      users(NULL),
+      admins(NULL),
+      tariffs(NULL),
+      store(NULL),
+      stgSettings(NULL)
 {
-isRunning = false;
-nonstop = false;
 }
 //-----------------------------------------------------------------------------
 void STG_CONFIG::SetUsers(USERS * u)
diff --git a/projects/stargazer/plugins/configuration/sgconfig/stgconfig.h b/projects/stargazer/plugins/configuration/sgconfig/stgconfig.h
index 57241c63..80cc16a7 100644
--- a/projects/stargazer/plugins/configuration/sgconfig/stgconfig.h
+++ b/projects/stargazer/plugins/configuration/sgconfig/stgconfig.h
@@ -52,7 +52,7 @@ public:
     virtual         ~STG_CONFIG_SETTINGS(){};
     const string &  GetStrError() const;
     int             ParseSettings(const MODULE_SETTINGS & s);
-    uint16_t        GetPort();
+    uint16_t        GetPort() const;
 private:
     int     ParseIntInRange(const string & str, int min, int max, int * val);
     string  errorStr;