diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2010-03-05 14:14:20 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2010-03-05 14:14:20 +0000 |
commit | 0afc2e7d99dd757e4578e929f29eefe92ff53ace (patch) | |
tree | 6c97081cc1ae8a1eeb4e86ca37a949c70752ff18 /TAO/tao/PortableServer | |
parent | 3344e3e784cfc1ee3ec4655ac08a943e9aa20362 (diff) | |
download | ATCD-0afc2e7d99dd757e4578e929f29eefe92ff53ace.tar.gz |
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
Diffstat (limited to 'TAO/tao/PortableServer')
-rw-r--r-- | TAO/tao/PortableServer/Servant_Base.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Servant_Base.h | 2 |
2 files changed, 6 insertions, 4 deletions
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. |