summaryrefslogtreecommitdiff
path: root/TAO/tao/PolicyC.i
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-01-17 03:02:14 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-01-17 03:02:14 +0000
commit0720a16b7badd3e8490fa49014e0bbe255112e88 (patch)
tree7f78bd3fcbb4b648eb21bc2798b2ee231e71fc5e /TAO/tao/PolicyC.i
parent083ac45c762606c50dcc1fb9181624f31ec41d3a (diff)
downloadATCD-0720a16b7badd3e8490fa49014e0bbe255112e88.tar.gz
ChangeLogTag: Tue Jan 16 20:43:46 2001 Jeff Parsons <parsons@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/PolicyC.i')
-rw-r--r--TAO/tao/PolicyC.i75
1 files changed, 63 insertions, 12 deletions
diff --git a/TAO/tao/PolicyC.i b/TAO/tao/PolicyC.i
index 91a5da00563..95fa4a00726 100644
--- a/TAO/tao/PolicyC.i
+++ b/TAO/tao/PolicyC.i
@@ -243,10 +243,27 @@ ACE_INLINE CORBA_InvalidPolicies::_tao_seq_UShort_var &
CORBA_InvalidPolicies::_tao_seq_UShort_var::operator= (const ::CORBA_InvalidPolicies::_tao_seq_UShort_var &p) // deep copy
{
if (this != &p)
- {
- delete this->ptr_;
- ACE_NEW_RETURN (this->ptr_, ::CORBA_InvalidPolicies::_tao_seq_UShort (*p.ptr_), *this);
- }
+ {
+ if (p.ptr_ == 0)
+ {
+ delete this->ptr_;
+ this->ptr_ = 0;
+ }
+ else
+ {
+ CORBA_InvalidPolicies::_tao_seq_UShort *deep_copy =
+ new CORBA_InvalidPolicies::_tao_seq_UShort (*p.ptr_);
+
+ if (deep_copy != 0)
+ {
+ CORBA_InvalidPolicies::_tao_seq_UShort *tmp = deep_copy;
+ deep_copy = this->ptr_;
+ this->ptr_ = tmp;
+ delete deep_copy;
+ }
+ }
+ }
+
return *this;
}
@@ -774,10 +791,27 @@ ACE_INLINE CORBA_PolicyList_var &
CORBA_PolicyList_var::operator= (const ::CORBA_PolicyList_var &p) // deep copy
{
if (this != &p)
- {
- delete this->ptr_;
- ACE_NEW_RETURN (this->ptr_, ::CORBA_PolicyList (*p.ptr_), *this);
- }
+ {
+ if (p.ptr_ == 0)
+ {
+ delete this->ptr_;
+ this->ptr_ = 0;
+ }
+ else
+ {
+ CORBA_PolicyList *deep_copy =
+ new CORBA_PolicyList (*p.ptr_);
+
+ if (deep_copy != 0)
+ {
+ CORBA_PolicyList *tmp = deep_copy;
+ deep_copy = this->ptr_;
+ this->ptr_ = tmp;
+ delete deep_copy;
+ }
+ }
+ }
+
return *this;
}
@@ -1152,10 +1186,27 @@ ACE_INLINE CORBA_PolicyTypeSeq_var &
CORBA_PolicyTypeSeq_var::operator= (const ::CORBA_PolicyTypeSeq_var &p) // deep copy
{
if (this != &p)
- {
- delete this->ptr_;
- ACE_NEW_RETURN (this->ptr_, ::CORBA_PolicyTypeSeq (*p.ptr_), *this);
- }
+ {
+ if (p.ptr_ == 0)
+ {
+ delete this->ptr_;
+ this->ptr_ = 0;
+ }
+ else
+ {
+ CORBA_PolicyTypeSeq *deep_copy =
+ new CORBA_PolicyTypeSeq (*p.ptr_);
+
+ if (deep_copy != 0)
+ {
+ CORBA_PolicyTypeSeq *tmp = deep_copy;
+ deep_copy = this->ptr_;
+ this->ptr_ = tmp;
+ delete deep_copy;
+ }
+ }
+ }
+
return *this;
}