From: Maxim Mamontov Date: Tue, 20 Sep 2011 12:34:33 +0000 (+0300) Subject: Explicitly initialize base class in copy ctors of notifiers X-Git-Tag: 2.408-rc1~8 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/324028b1d412ab7308d2be18be2b8e4e30310d27?hp=0b4df29c8f7c08adc5865dbac01051040e7d45e0 Explicitly initialize base class in copy ctors of notifiers --- diff --git a/projects/stargazer/plugins/authorization/ao/ao.h b/projects/stargazer/plugins/authorization/ao/ao.h index 5d17cbff..fe267c4e 100644 --- a/projects/stargazer/plugins/authorization/ao/ao.h +++ b/projects/stargazer/plugins/authorization/ao/ao.h @@ -46,10 +46,11 @@ class USERS; template class CHG_BEFORE_NOTIFIER : public PROPERTY_NOTIFIER_BASE { public: - CHG_BEFORE_NOTIFIER(AUTH_AO & a, USER_PTR u) : user(u), auth(a) {} + CHG_BEFORE_NOTIFIER(AUTH_AO & a, USER_PTR u) + : PROPERTY_NOTIFIER_BASE(), user(u), auth(a) {} CHG_BEFORE_NOTIFIER(const CHG_BEFORE_NOTIFIER & rvalue) - : user(rvalue.user), auth(rvalue.auth) - {} + : PROPERTY_NOTIFIER_BASE(), + user(rvalue.user), auth(rvalue.auth) {} void Notify(const T & oldValue, const T & newValue); USER_PTR GetUser() const { return user; } @@ -63,10 +64,11 @@ private: template class CHG_AFTER_NOTIFIER : public PROPERTY_NOTIFIER_BASE { public: - CHG_AFTER_NOTIFIER(AUTH_AO & a, USER_PTR u) : user(u), auth(a) {} + CHG_AFTER_NOTIFIER(AUTH_AO & a, USER_PTR u) + : PROPERTY_NOTIFIER_BASE(), user(u), auth(a) {} CHG_AFTER_NOTIFIER(const CHG_AFTER_NOTIFIER & rvalue) - : user(rvalue.user), auth(rvalue.auth) - {} + : PROPERTY_NOTIFIER_BASE(), + user(rvalue.user), auth(rvalue.auth) {} void Notify(const T & oldValue, const T & newValue); USER_PTR GetUser() const { return user; } diff --git a/projects/stargazer/plugins/other/ping/ping.h b/projects/stargazer/plugins/other/ping/ping.h index d25f6388..63b86a6e 100644 --- a/projects/stargazer/plugins/other/ping/ping.h +++ b/projects/stargazer/plugins/other/ping/ping.h @@ -28,10 +28,11 @@ class SETTINGS; //-----------------------------------------------------------------------------*/ class CHG_CURRIP_NOTIFIER_PING: public PROPERTY_NOTIFIER_BASE { public: - CHG_CURRIP_NOTIFIER_PING(const PING & p, USER_PTR u) : user(u), ping(p) {} + CHG_CURRIP_NOTIFIER_PING(const PING & p, USER_PTR u) + : PROPERTY_NOTIFIER_BASE(), user(u), ping(p) {} CHG_CURRIP_NOTIFIER_PING(const CHG_CURRIP_NOTIFIER_PING & rvalue) - : user(rvalue.user), ping(rvalue.ping) - {} + : PROPERTY_NOTIFIER_BASE(), + user(rvalue.user), ping(rvalue.ping) {} void Notify(const uint32_t & oldIP, const uint32_t & newIP); USER_PTR GetUser() const { return user; } @@ -44,10 +45,11 @@ private: //----------------------------------------------------------------------------- class CHG_IPS_NOTIFIER_PING: public PROPERTY_NOTIFIER_BASE { public: - CHG_IPS_NOTIFIER_PING(const PING & p, USER_PTR u) : user(u), ping(p) {} + CHG_IPS_NOTIFIER_PING(const PING & p, USER_PTR u) + : PROPERTY_NOTIFIER_BASE(), user(u), ping(p) {} CHG_IPS_NOTIFIER_PING(const CHG_IPS_NOTIFIER_PING & rvalue) - : user(rvalue.user), ping(rvalue.ping) - {} + : PROPERTY_NOTIFIER_BASE(), + user(rvalue.user), ping(rvalue.ping) {} void Notify(const USER_IPS & oldIPS, const USER_IPS & newIPS); USER_PTR GetUser() const { return user; } @@ -60,7 +62,7 @@ private: //----------------------------------------------------------------------------- class ADD_USER_NONIFIER_PING: public NOTIFIER_BASE { public: - ADD_USER_NONIFIER_PING(PING & p) : ping(p) {} + ADD_USER_NONIFIER_PING(PING & p) : NOTIFIER_BASE(), ping(p) {} virtual ~ADD_USER_NONIFIER_PING() {} void Notify(const USER_PTR & user); @@ -73,7 +75,7 @@ private: //----------------------------------------------------------------------------- class DEL_USER_NONIFIER_PING: public NOTIFIER_BASE { public: - DEL_USER_NONIFIER_PING(PING & p) : ping(p) {} + DEL_USER_NONIFIER_PING(PING & p) : NOTIFIER_BASE(), ping(p) {} virtual ~DEL_USER_NONIFIER_PING() {} void Notify(const USER_PTR & user); diff --git a/projects/stargazer/plugins/other/rscript/rscript.h b/projects/stargazer/plugins/other/rscript/rscript.h index ca52adf8..461fcacd 100644 --- a/projects/stargazer/plugins/other/rscript/rscript.h +++ b/projects/stargazer/plugins/other/rscript/rscript.h @@ -60,7 +60,8 @@ class SETTINGS; //----------------------------------------------------------------------------- class RS_ADD_USER_NONIFIER: public NOTIFIER_BASE { public: - RS_ADD_USER_NONIFIER(REMOTE_SCRIPT & r) : rs(r) {} + RS_ADD_USER_NONIFIER(REMOTE_SCRIPT & r) + : NOTIFIER_BASE(), rs(r) {} virtual ~RS_ADD_USER_NONIFIER() {} void Notify(const USER_PTR & user); @@ -73,7 +74,8 @@ private: //----------------------------------------------------------------------------- class RS_DEL_USER_NONIFIER: public NOTIFIER_BASE { public: - RS_DEL_USER_NONIFIER(REMOTE_SCRIPT & r) : rs(r) {} + RS_DEL_USER_NONIFIER(REMOTE_SCRIPT & r) + : NOTIFIER_BASE(), rs(r) {} virtual ~RS_DEL_USER_NONIFIER() {} void Notify(const USER_PTR & user); @@ -87,10 +89,10 @@ private: template class RS_CHG_AFTER_NOTIFIER: public PROPERTY_NOTIFIER_BASE { public: - RS_CHG_AFTER_NOTIFIER(REMOTE_SCRIPT & r, USER_PTR u) : user(u), rs(r) {} + RS_CHG_AFTER_NOTIFIER(REMOTE_SCRIPT & r, USER_PTR u) + : PROPERTY_NOTIFIER_BASE(), user(u), rs(r) {} RS_CHG_AFTER_NOTIFIER(const RS_CHG_AFTER_NOTIFIER & rvalue) - : user(rvalue.user), rs(rvalue.rs) - {} + : PROPERTY_NOTIFIER_BASE(), user(rvalue.user), rs(rvalue.rs) {} void Notify(const T & oldValue, const T & newValue); USER_PTR GetUser() { return user; } diff --git a/projects/stargazer/plugins/other/smux/smux.h b/projects/stargazer/plugins/other/smux/smux.h index 7337deaf..a9232608 100644 --- a/projects/stargazer/plugins/other/smux/smux.h +++ b/projects/stargazer/plugins/other/smux/smux.h @@ -57,8 +57,12 @@ private: //----------------------------------------------------------------------------- class CHG_AFTER_NOTIFIER : public PROPERTY_NOTIFIER_BASE { public: - CHG_AFTER_NOTIFIER(SMUX & s, const USER_PTR & u) : smux(s), userPtr(u) {} - CHG_AFTER_NOTIFIER(const CHG_AFTER_NOTIFIER & rvalue) : smux(rvalue.smux), userPtr(rvalue.userPtr) {} + CHG_AFTER_NOTIFIER(SMUX & s, const USER_PTR & u) + : PROPERTY_NOTIFIER_BASE(), + smux(s), userPtr(u) {} + CHG_AFTER_NOTIFIER(const CHG_AFTER_NOTIFIER & rvalue) + : PROPERTY_NOTIFIER_BASE(), + smux(rvalue.smux), userPtr(rvalue.userPtr) {} void Notify(const std::string &, const std::string &); USER_PTR GetUserPtr() { return userPtr; } @@ -71,7 +75,8 @@ private: //----------------------------------------------------------------------------- class ADD_DEL_TARIFF_NOTIFIER : public NOTIFIER_BASE, private NONCOPYABLE { public: - ADD_DEL_TARIFF_NOTIFIER(SMUX & s) : smux(s) {} + ADD_DEL_TARIFF_NOTIFIER(SMUX & s) + : NOTIFIER_BASE(), smux(s) {} void Notify(const TARIFF_DATA &); private: @@ -80,7 +85,7 @@ private: //----------------------------------------------------------------------------- class ADD_USER_NOTIFIER : public NOTIFIER_BASE, private NONCOPYABLE { public: - ADD_USER_NOTIFIER(SMUX & s) : smux(s) {} + ADD_USER_NOTIFIER(SMUX & s) : NOTIFIER_BASE(), smux(s) {} void Notify(const USER_PTR &); private: @@ -89,7 +94,7 @@ private: //----------------------------------------------------------------------------- class DEL_USER_NOTIFIER : public NOTIFIER_BASE, private NONCOPYABLE { public: - DEL_USER_NOTIFIER(SMUX & s) : smux(s) {} + DEL_USER_NOTIFIER(SMUX & s) : NOTIFIER_BASE(), smux(s) {} void Notify(const USER_PTR &); private: