From: Maxim Mamontov Date: Sat, 21 Jan 2017 19:05:30 +0000 (+0200) Subject: Merge branch 'stg-2.409' X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/d8845c7819caac09b95c4cdf1e8d48cc1cb1b7a6 Merge branch 'stg-2.409' --- d8845c7819caac09b95c4cdf1e8d48cc1cb1b7a6 diff --cc include/stg/user_traff.h index 8ef8e260,d820588e..3ca9768e --- a/include/stg/user_traff.h +++ b/include/stg/user_traff.h @@@ -92,9 -89,14 +90,15 @@@ public for (IndexType i = 0; i < ts.size(); ++i) traff[i] = ts[i]; } + DIR_TRAFF_RES & operator=(const DIR_TRAFF & ts) + { + for (IndexType i = 0; i < ts.size(); ++i) + traff[i] = ts[i]; + return *this; + } const ValueType & operator[](IndexType idx) const { return traff[idx]; } ValueType & operator[](IndexType idx) { return traff[idx]; } + IndexType size() const { return traff.size(); } DIR_TRAFF GetData() const { DIR_TRAFF res; diff --cc projects/stargazer/plugins/configuration/sgconfig/configproto.h index c464e95e,f8073575..87a5ef79 --- a/projects/stargazer/plugins/configuration/sgconfig/configproto.h +++ b/projects/stargazer/plugins/configuration/sgconfig/configproto.h @@@ -52,23 -50,21 +52,23 @@@ class Conn class CONFIGPROTO { public: - CONFIGPROTO(PLUGIN_LOGGER & l); + explicit CONFIGPROTO(PLUGIN_LOGGER & l); ~CONFIGPROTO(); - void SetPort(uint16_t port) { m_port = port; } - void SetBindAddress(const std::string & address) { m_bindAddress = address; } - void SetSettings(const SETTINGS * settings) { m_settings = settings; } - void SetAdmins(ADMINS * admins) { m_admins = admins; } - void SetTariffs(TARIFFS * tariffs) { m_tariffs = tariffs; } - void SetUsers(USERS * users) { m_users = users; } - void SetStore(STORE * store) { m_store = store; } - - int Prepare(); - int Stop(); + void SetPort(uint16_t port) { m_port = port; } + void SetBindAddress(const std::string & address) { m_bindAddress = address; } + void SetSettings(const SETTINGS * settings) { m_settings = settings; } + void SetAdmins(ADMINS * admins) { m_admins = admins; } + void SetTariffs(TARIFFS * tariffs) { m_tariffs = tariffs; } + void SetUsers(USERS * users) { m_users = users; } + void SetStore(STORE * store) { m_store = store; } + void SetServices(SERVICES * services) { m_services = services; } + void SetCorporations(CORPORATIONS * corporations) { m_corporations = corporations; } + + int Prepare(); + int Stop(); const std::string & GetStrError() const { return m_errorStr; } - void Run(); + void Run(); private: CONFIGPROTO(const CONFIGPROTO & rvalue);