diff options
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/ChangeLog | 7 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Servant_Base.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Servant_Base.h | 2 |
3 files changed, 13 insertions, 4 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 5267537e477..0ad9b20c63e 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,10 @@ +Fri Mar 5 14:14:06 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/PortableServer/Servant_Base.cpp: + * tao/PortableServer/Servant_Base.h: + Changed refcount to unsigned long and remove casts, we have + an atomic op specialization for unsigned long for years now + Fri Mar 5 12:28:06 UTC 2010 Marcel Smit <msmit@remedy.nl> * TAO_IDL/be/be_visitor_connector/connector_dds_exh.cpp: diff --git a/TAO/tao/PortableServer/Servant_Base.cpp b/TAO/tao/PortableServer/Servant_Base.cpp index 22ef8f19b7d..feca70b4c51 100644 --- a/TAO/tao/PortableServer/Servant_Base.cpp +++ b/TAO/tao/PortableServer/Servant_Base.cpp @@ -317,16 +317,18 @@ TAO_ServantBase::_add_ref (void) void TAO_ServantBase::_remove_ref (void) { - long const new_count = --this->ref_count_; + unsigned long const new_count = --this->ref_count_; if (new_count == 0) - delete this; + { + delete this; + } } CORBA::ULong TAO_ServantBase::_refcount_value (void) const { - return static_cast<CORBA::ULong> (this->ref_count_.value ()); + return this->ref_count_.value (); } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/PortableServer/Servant_Base.h b/TAO/tao/PortableServer/Servant_Base.h index b8923c91fdc..2568f693177 100644 --- a/TAO/tao/PortableServer/Servant_Base.h +++ b/TAO/tao/PortableServer/Servant_Base.h @@ -151,7 +151,7 @@ protected: protected: /// Reference counter. - ACE_Atomic_Op<TAO_SYNCH_MUTEX, long> ref_count_; + ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> ref_count_; /// The operation table for this servant. It is initialized by the /// most derived class. |