diff options
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.cpp')
-rw-r--r-- | runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.cpp index df978c084..dc64afa95 100644 --- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.cpp +++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.cpp @@ -22,9 +22,13 @@ Address::Address(const Address & right) : m_objectID(right.m_objectID) {
};
-Address & Address::operator = (Address s) {
- std::swap(s, *this);
- return *this;
+Address & Address::operator = (const Address& right) {
+ if (this != &right) {
+ m_nodeID = right.m_nodeID;
+ m_threadID = right.m_threadID;
+ m_objectID = right.m_objectID;
+ }
+ return *this;
}
bool Address::operator< (const Address& right) const {
|