From: Maxim Mamontov Date: Thu, 16 Jun 2011 09:53:48 +0000 (+0300) Subject: Explicit constructor initialization for the base class added X-Git-Tag: 2.408-alpha~97 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/4844bbe6135addc1ffdc33ed0576aebea0153e6d?ds=inline;hp=-c Explicit constructor initialization for the base class added --- 4844bbe6135addc1ffdc33ed0576aebea0153e6d diff --git a/projects/stargazer/admin_impl.cpp b/projects/stargazer/admin_impl.cpp index 3d5574c7..7f1b301f 100644 --- a/projects/stargazer/admin_impl.cpp +++ b/projects/stargazer/admin_impl.cpp @@ -33,14 +33,16 @@ //----------------------------------------------------------------------------- ADMIN_IMPL::ADMIN_IMPL() - : conf(), + : ADMIN(), + conf(), ip(0), WriteServLog(GetStgLogger()) { } //----------------------------------------------------------------------------- ADMIN_IMPL::ADMIN_IMPL(const ADMIN_CONF & ac) - : conf(ac), + : ADMIN(), + conf(ac), ip(0), WriteServLog(GetStgLogger()) { @@ -49,7 +51,8 @@ ADMIN_IMPL::ADMIN_IMPL(const ADMIN_CONF & ac) ADMIN_IMPL::ADMIN_IMPL(const PRIV & priv, const std::string & login, const std::string & password) - : conf(priv, login, password), + : ADMIN(), + conf(priv, login, password), ip(0), WriteServLog(GetStgLogger()) { diff --git a/projects/stargazer/admins_impl.cpp b/projects/stargazer/admins_impl.cpp index 4980234a..3fe2c10b 100644 --- a/projects/stargazer/admins_impl.cpp +++ b/projects/stargazer/admins_impl.cpp @@ -42,7 +42,8 @@ using namespace std; //----------------------------------------------------------------------------- ADMINS_IMPL::ADMINS_IMPL(STORE * st) - : stg(0xFFFF, "@stargazer", ""), + : ADMINS(), + stg(0xFFFF, "@stargazer", ""), noAdmin(0xFFFF, "NO-ADMIN", ""), data(), store(st), diff --git a/projects/stargazer/settings_impl.cpp b/projects/stargazer/settings_impl.cpp index f9135a1a..d197efc4 100644 --- a/projects/stargazer/settings_impl.cpp +++ b/projects/stargazer/settings_impl.cpp @@ -40,7 +40,8 @@ using namespace std; //----------------------------------------------------------------------------- SETTINGS_IMPL::SETTINGS_IMPL() - : strError(), + : SETTINGS(), + strError(), modulesPath("/usr/lib/stg"), dirName(DIR_NUM), confDir("/etc/stargazer"), @@ -72,7 +73,8 @@ SETTINGS_IMPL::SETTINGS_IMPL() } //----------------------------------------------------------------------------- SETTINGS_IMPL::SETTINGS_IMPL(const std::string & cd) - : strError(), + : SETTINGS(), + strError(), modulesPath("/usr/lib/stg"), dirName(DIR_NUM), confDir(cd), @@ -104,7 +106,8 @@ SETTINGS_IMPL::SETTINGS_IMPL(const std::string & cd) } //----------------------------------------------------------------------------- SETTINGS_IMPL::SETTINGS_IMPL(const SETTINGS_IMPL & rval) - : strError(), + : SETTINGS(), + strError(), modulesPath(rval.modulesPath), dirName(rval.dirName), confDir(rval.confDir), diff --git a/projects/stargazer/tariff_impl.h b/projects/stargazer/tariff_impl.h index b8d0a776..cdfd7112 100644 --- a/projects/stargazer/tariff_impl.h +++ b/projects/stargazer/tariff_impl.h @@ -46,16 +46,20 @@ class TARIFF_IMPL : public TARIFF { public: TARIFF_IMPL() - : tariffData() + : TARIFF(), + tariffData() {}; TARIFF_IMPL(const std::string & name) - : tariffData(name) + : TARIFF(), + tariffData(name) {}; TARIFF_IMPL(const TARIFF_DATA & td) - : tariffData(td) + : TARIFF(), + tariffData(td) {}; TARIFF_IMPL(const TARIFF_IMPL & t) - : tariffData(t.tariffData) + : TARIFF(), + tariffData(t.tariffData) {}; virtual ~TARIFF_IMPL() {}; diff --git a/projects/stargazer/tariffs_impl.cpp b/projects/stargazer/tariffs_impl.cpp index d6d6b36a..d2ea7c9a 100644 --- a/projects/stargazer/tariffs_impl.cpp +++ b/projects/stargazer/tariffs_impl.cpp @@ -42,7 +42,8 @@ using namespace std; //----------------------------------------------------------------------------- TARIFFS_IMPL::TARIFFS_IMPL(STORE * st) - : tariffs(), + : TARIFFS(), + tariffs(), store(st), WriteServLog(GetStgLogger()), strError(), diff --git a/projects/stargazer/traffcounter_impl.cpp b/projects/stargazer/traffcounter_impl.cpp index 424cc094..237799f5 100644 --- a/projects/stargazer/traffcounter_impl.cpp +++ b/projects/stargazer/traffcounter_impl.cpp @@ -37,6 +37,7 @@ #include #include #include // fopen and similar +#include // strtol #include "stg/common.h" #include "stg/locker.h" @@ -57,7 +58,8 @@ tcp = 0, udp, icmp, tcp_udp, all //----------------------------------------------------------------------------- TRAFFCOUNTER_IMPL::TRAFFCOUNTER_IMPL(USERS_IMPL * u, const std::string & fn) - : WriteServLog(GetStgLogger()), + : TRAFFCOUNTER(), + WriteServLog(GetStgLogger()), rulesFileName(fn), monitoring(false), users(u), diff --git a/projects/stargazer/user_impl.cpp b/projects/stargazer/user_impl.cpp index e8d326d2..ec271442 100644 --- a/projects/stargazer/user_impl.cpp +++ b/projects/stargazer/user_impl.cpp @@ -54,7 +54,8 @@ USER_IMPL::USER_IMPL(const SETTINGS * s, const TARIFFS * t, const ADMIN * a, const USERS * u) - : users(u), + : USER(), + users(u), property(s->GetScriptsDir()), WriteServLog(GetStgLogger()), login(), @@ -137,7 +138,8 @@ USER_IMPL::USER_IMPL(const SETTINGS_IMPL * s, const TARIFFS * t, const ADMIN * a, const USERS * u) - : users(u), + : USER(), + users(u), property(s->GetScriptsDir()), WriteServLog(GetStgLogger()), login(), @@ -217,7 +219,8 @@ pthread_mutex_init(&mutex, &attr); #endif //----------------------------------------------------------------------------- USER_IMPL::USER_IMPL(const USER_IMPL & u) - : users(u.users), + : USER(), + users(u.users), property(u.settings->GetScriptsDir()), WriteServLog(GetStgLogger()), login(u.login), diff --git a/projects/stargazer/users_impl.cpp b/projects/stargazer/users_impl.cpp index d0e53644..febd90f5 100644 --- a/projects/stargazer/users_impl.cpp +++ b/projects/stargazer/users_impl.cpp @@ -53,7 +53,8 @@ extern const volatile time_t stgTime; //----------------------------------------------------------------------------- USERS_IMPL::USERS_IMPL(SETTINGS_IMPL * s, STORE * st, TARIFFS * t, const ADMIN * sa) - : users(), + : USERS(), + users(), usersToDelete(), userIPNotifiersBefore(), userIPNotifiersAfter(), @@ -274,7 +275,7 @@ usersList.clear(); if (store->GetUsersList(&usersList) < 0) { WriteServLog(store->GetStrError().c_str()); - exit(1); + return -1; } user_iter ui;