summaryrefslogtreecommitdiff
path: root/TAO/tao/Sequence_T.cpp
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-04-01 07:03:13 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-04-01 07:03:13 +0000
commit7ddd94a0159a234a2c31b4a1b07b7748b5114e0d (patch)
tree0db3b5ab6c404a81ff70f1937154372fab999c8d /TAO/tao/Sequence_T.cpp
parentd551f85e057b323158e1648aa86b4df2020cf82a (diff)
downloadATCD-refactor.tar.gz
ChangeLogTag: Tue Apr 1 000:37:21 2003 Jeff Parsons <j.parsons@vanderbilt.edu>refactor
Diffstat (limited to 'TAO/tao/Sequence_T.cpp')
-rw-r--r--TAO/tao/Sequence_T.cpp48
1 files changed, 8 insertions, 40 deletions
diff --git a/TAO/tao/Sequence_T.cpp b/TAO/tao/Sequence_T.cpp
index 2c7bbb97fce..a78e7aa8e10 100644
--- a/TAO/tao/Sequence_T.cpp
+++ b/TAO/tao/Sequence_T.cpp
@@ -636,23 +636,11 @@ TAO_Abstract_Manager<T,T_var,T_life>::operator= (
if (this->release_)
{
- if (*this->ptr_ != 0)
- {
- (*this->ptr_)->_remove_ref ();
- }
-
- *this->ptr_ = *rhs.ptr_;
-
- if (*this->ptr_ != 0)
- {
- (*this->ptr_)->_add_ref ();
- }
- }
- else
- {
- *this->ptr_ = *rhs.ptr_;
+ T_life::tao_release (*this->ptr_);
+ T_life::tao_duplicate (*rhs->ptr_);
}
+ *this->ptr_ = *rhs.ptr_;
return *this;
}
@@ -666,18 +654,10 @@ TAO_Abstract_Manager<T,T_var,T_life>::operator= (T * p)
// that of a var variable. Therefore we will not duplicate the
// user provided pointer before assigning it to the internal
// variable.
- if (*this->ptr_ != 0)
- {
- (*this->ptr_)->_remove_ref ();
- }
-
- *this->ptr_ = p;
- }
- else
- {
- *this->ptr_ = p;
+ T_life::tao_release (*this->ptr_);
}
+ *this->ptr_ = p;
return *this;
}
@@ -691,23 +671,11 @@ TAO_Abstract_Manager<T,T_var,T_life>::operator= (const T_var & p)
// that of a var variable. Therefore we duplicate p's
// pointer before assigning it to the internal
// variable.
- if (*this->ptr_ != 0)
- {
- (*this->ptr_)->_remove_ref ();
- }
-
- *this->ptr_ = p.in ();
-
- if (p != 0)
- {
- p->_add_ref ();
- }
- }
- else
- {
- *this->ptr_ = p.in ();
+ T_life::tao_release (*this->ptr_);
+ T_life::tao_duplicate (p.in ());
}
+ *this->ptr_ = p.in ();
return *this;
}