X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/703ad5b9a14dc2a42849669d3618a8ba1136bb92..f7805a596d2e7c451b997701ee21305a7fe23698:/include/stg/user_property.h?ds=sidebyside diff --git a/include/stg/user_property.h b/include/stg/user_property.h index bdad48b0..9030d37f 100644 --- a/include/stg/user_property.h +++ b/include/stg/user_property.h @@ -43,10 +43,10 @@ public: operator const varT&() const throw() { return value; } void AddBeforeNotifier(PROPERTY_NOTIFIER_BASE<varT> * n); - void DelBeforeNotifier(PROPERTY_NOTIFIER_BASE<varT> * n); + void DelBeforeNotifier(const PROPERTY_NOTIFIER_BASE<varT> * n); void AddAfterNotifier(PROPERTY_NOTIFIER_BASE<varT> * n); - void DelAfterNotifier(PROPERTY_NOTIFIER_BASE<varT> * n); + void DelAfterNotifier(const PROPERTY_NOTIFIER_BASE<varT> * n); time_t ModificationTime() const throw() { return modificationTime; } void ModifyTime() throw(); @@ -236,10 +236,10 @@ beforeNotifiers.insert(n); //----------------------------------------------------------------------------- template <typename varT> inline -void USER_PROPERTY<varT>::DelBeforeNotifier(PROPERTY_NOTIFIER_BASE<varT> * n) +void USER_PROPERTY<varT>::DelBeforeNotifier(const PROPERTY_NOTIFIER_BASE<varT> * n) { STG_LOCKER locker(&mutex, __FILE__, __LINE__); -beforeNotifiers.erase(n); +beforeNotifiers.erase(const_cast<PROPERTY_NOTIFIER_BASE<varT> *>(n)); } //----------------------------------------------------------------------------- template <typename varT> @@ -252,10 +252,10 @@ afterNotifiers.insert(n); //----------------------------------------------------------------------------- template <typename varT> inline -void USER_PROPERTY<varT>::DelAfterNotifier(PROPERTY_NOTIFIER_BASE<varT> * n) +void USER_PROPERTY<varT>::DelAfterNotifier(const PROPERTY_NOTIFIER_BASE<varT> * n) { STG_LOCKER locker(&mutex, __FILE__, __LINE__); -afterNotifiers.erase(n); +afterNotifiers.erase(const_cast<PROPERTY_NOTIFIER_BASE<varT> *>(n)); } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- @@ -286,8 +286,6 @@ bool USER_PROPERTY_LOGGED<varT>::Set(const varT & val, const std::string & msg) { const PRIV * priv = admin->GetPriv(); -std::string adm_login = admin->GetLogin(); -std::string adm_ip = admin->GetIPStr(); if ((priv->userConf && !isStat) || (priv->userStat && isStat) ||