You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ro...@apache.org on 2007/03/13 18:53:04 UTC
svn commit: r517787 -
/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SequenceImpl.h
Author: robbinspg
Date: Tue Mar 13 10:53:03 2007
New Revision: 517787
URL: http://svn.apache.org/viewvc?view=rev&rev=517787
Log:
Fix assignment operator
Modified:
incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SequenceImpl.h
Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SequenceImpl.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SequenceImpl.h?view=diff&rev=517787&r1=517786&r2=517787
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SequenceImpl.h (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SequenceImpl.h Tue Mar 13 10:53:03 2007
@@ -331,17 +331,21 @@
}
// Copy assignment
- seq_item& operator=(const seq_item& sin)
- {
- if (freeText)
+ seq_item& operator=(const seq_item& sin)
{
- delete freeText;
+ if (this != &sin)
+ {
+ if (freeText)
+ {
+ delete freeText;
+ }
+ if (sin.freeText != 0)
+ {
+ freeText = new SDOValue(*sin.freeText);
+ }
+ }
+ return *this;
}
- if (sin.freeText != 0)
- {
- freeText = new SDOValue(*sin.freeText);
- }
- }
// Destructor
~seq_item()
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org