X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/fe9860ffc1555d5bf5a3f2132d9d073b5da85226..b1f2c74d7aca187772c2f009fda4a3043eb9686f:/include/stg/user_property.h diff --git a/include/stg/user_property.h b/include/stg/user_property.h index fbd6aa46..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)); } //----------------------------------------------------------------------------- //-----------------------------------------------------------------------------