diff options
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. |