X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/a39afcce76c3a02331385af96a474207d057fb09..6ab0912300acfcc3b686e31f698d090459b6d140:/include/stg/user_property.h diff --git a/include/stg/user_property.h b/include/stg/user_property.h index fbd6aa46..2ff8909c 100644 --- a/include/stg/user_property.h +++ b/include/stg/user_property.h @@ -24,7 +24,7 @@ $Author: faust $ #include "notifer.h" #include "noncopyable.h" -extern const volatile time_t stgTime; +extern volatile time_t stgTime; //----------------------------------------------------------------------------- template @@ -43,10 +43,10 @@ public: operator const varT&() const throw() { return value; } void AddBeforeNotifier(PROPERTY_NOTIFIER_BASE * n); - void DelBeforeNotifier(PROPERTY_NOTIFIER_BASE * n); + void DelBeforeNotifier(const PROPERTY_NOTIFIER_BASE * n); void AddAfterNotifier(PROPERTY_NOTIFIER_BASE * n); - void DelAfterNotifier(PROPERTY_NOTIFIER_BASE * n); + void DelAfterNotifier(const PROPERTY_NOTIFIER_BASE * n); time_t ModificationTime() const throw() { return modificationTime; } void ModifyTime() throw(); @@ -236,10 +236,10 @@ beforeNotifiers.insert(n); //----------------------------------------------------------------------------- template inline -void USER_PROPERTY::DelBeforeNotifier(PROPERTY_NOTIFIER_BASE * n) +void USER_PROPERTY::DelBeforeNotifier(const PROPERTY_NOTIFIER_BASE * n) { STG_LOCKER locker(&mutex, __FILE__, __LINE__); -beforeNotifiers.erase(n); +beforeNotifiers.erase(const_cast *>(n)); } //----------------------------------------------------------------------------- template @@ -252,10 +252,10 @@ afterNotifiers.insert(n); //----------------------------------------------------------------------------- template inline -void USER_PROPERTY::DelAfterNotifier(PROPERTY_NOTIFIER_BASE * n) +void USER_PROPERTY::DelAfterNotifier(const PROPERTY_NOTIFIER_BASE * n) { STG_LOCKER locker(&mutex, __FILE__, __LINE__); -afterNotifiers.erase(n); +afterNotifiers.erase(const_cast *>(n)); } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- @@ -295,8 +295,8 @@ if ((priv->userConf && !isStat) || std::stringstream oldVal; std::stringstream newVal; - oldVal.flags(oldVal.flags() | ios::fixed); - newVal.flags(newVal.flags() | ios::fixed); + oldVal.flags(oldVal.flags() | std::ios::fixed); + newVal.flags(newVal.flags() | std::ios::fixed); oldVal << USER_PROPERTY::ConstData(); newVal << val; @@ -377,7 +377,7 @@ else //------------------------------------------------------------------------- template inline -ostream & operator<< (ostream & stream, const USER_PROPERTY & value) +std::ostream & operator<< (std::ostream & stream, const USER_PROPERTY & value) { return stream << value.ConstData(); }