summaryrefslogtreecommitdiff
path: root/TAO/tao/Profile.inl
diff options
context:
space:
mode:
authormcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2011-02-11 11:33:12 +0000
committermcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2011-02-11 11:33:12 +0000
commit4df04cc27ef1e77bcc941afaba7d4c943b98a936 (patch)
tree5054c2bde24d048d4790ff659b61be0838cd0d69 /TAO/tao/Profile.inl
parentb723802f85ac66026a503827677a2fb1e9a77933 (diff)
downloadATCD-4df04cc27ef1e77bcc941afaba7d4c943b98a936.tar.gz
Fri Feb 11 11:16:00 UTC 2011 Martin Corino <mcorino@remedy.nl>
Merged changes from Remedy work branch.
Diffstat (limited to 'TAO/tao/Profile.inl')
-rw-r--r--TAO/tao/Profile.inl18
1 files changed, 9 insertions, 9 deletions
diff --git a/TAO/tao/Profile.inl b/TAO/tao/Profile.inl
index 676b90e438b..00f4089d984 100644
--- a/TAO/tao/Profile.inl
+++ b/TAO/tao/Profile.inl
@@ -67,20 +67,20 @@ TAO_Profile::object_key (void) const
ACE_INLINE unsigned long
TAO_Profile::_incr_refcnt (void)
{
- return this->refcount_.increment ();
+ return ++this->refcount_;
}
ACE_INLINE unsigned long
TAO_Profile::_decr_refcnt (void)
{
- unsigned long count = this->refcount_.decrement ();
- if (count != 0)
- return count;
-
- // refcount is 0, so delete us!
- // delete will call our ~ destructor which in turn deletes stuff.
- delete this;
- return 0;
+ unsigned long count = --this->refcount_;
+ if (count == 0)
+ {
+ // refcount is 0, so delete us!
+ // delete will call our ~ destructor which in turn deletes stuff.
+ delete this;
+ }
+ return count;
}