X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/258b7ce79dba0c01b378e73bd6b8ee9fb1ae695d..19b50f3bd82ecc7ee07067b76a697d559b18a8f1:/include/stg/user_property.h diff --git a/include/stg/user_property.h b/include/stg/user_property.h index 97c1af51..20ca6fd8 100644 --- a/include/stg/user_property.h +++ b/include/stg/user_property.h @@ -81,6 +81,7 @@ public: virtual ~USER_PROPERTY_LOGGED() {} USER_PROPERTY_LOGGED<varT> * GetPointer() throw() { return this; } + const USER_PROPERTY_LOGGED<varT> * GetPointer() const throw() { return this; } const varT & Get() const { return USER_PROPERTY<varT>::ConstData(); } const std::string & GetName() const { return name; } bool Set(const varT & val, @@ -214,7 +215,7 @@ template <typename varT> inline void USER_PROPERTY<varT>::Set(const varT & rvalue) { -STG_LOCKER locker(&mutex, __FILE__, __LINE__); +STG_LOCKER locker(&mutex); typename std::set<PROPERTY_NOTIFIER_BASE<varT> *>::iterator ni; @@ -244,7 +245,7 @@ template <typename varT> inline void USER_PROPERTY<varT>::AddBeforeNotifier(PROPERTY_NOTIFIER_BASE<varT> * n) { -STG_LOCKER locker(&mutex, __FILE__, __LINE__); +STG_LOCKER locker(&mutex); beforeNotifiers.insert(n); } //----------------------------------------------------------------------------- @@ -252,7 +253,7 @@ template <typename varT> inline void USER_PROPERTY<varT>::DelBeforeNotifier(const PROPERTY_NOTIFIER_BASE<varT> * n) { -STG_LOCKER locker(&mutex, __FILE__, __LINE__); +STG_LOCKER locker(&mutex); beforeNotifiers.erase(const_cast<PROPERTY_NOTIFIER_BASE<varT> *>(n)); } //----------------------------------------------------------------------------- @@ -260,7 +261,7 @@ template <typename varT> inline void USER_PROPERTY<varT>::AddAfterNotifier(PROPERTY_NOTIFIER_BASE<varT> * n) { -STG_LOCKER locker(&mutex, __FILE__, __LINE__); +STG_LOCKER locker(&mutex); afterNotifiers.insert(n); } //----------------------------------------------------------------------------- @@ -268,7 +269,7 @@ template <typename varT> inline void USER_PROPERTY<varT>::DelAfterNotifier(const PROPERTY_NOTIFIER_BASE<varT> * n) { -STG_LOCKER locker(&mutex, __FILE__, __LINE__); +STG_LOCKER locker(&mutex); afterNotifiers.erase(const_cast<PROPERTY_NOTIFIER_BASE<varT> *>(n)); } //-----------------------------------------------------------------------------