summaryrefslogtreecommitdiff
path: root/ace/SString.cpp
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-06-10 17:59:18 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-06-10 17:59:18 +0000
commit2b49086bda48ec528be0b50d368a0af379c0118e (patch)
treeea47b392db7c988fe0a70eb0abab0a4cf15d5632 /ace/SString.cpp
parent22492a074a5de85ad87ff6e4e807f37359d20973 (diff)
downloadATCD-2b49086bda48ec528be0b50d368a0af379c0118e.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/SString.cpp')
-rw-r--r--ace/SString.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/ace/SString.cpp b/ace/SString.cpp
index b3205a2f3a4..057078d2277 100644
--- a/ace/SString.cpp
+++ b/ace/SString.cpp
@@ -677,13 +677,13 @@ ACE_WString::operator = (const ACE_WString &s)
{
this->allocator_->free (this->rep_);
this->rep_ = (ACE_USHORT16 *) this->allocator_->malloc ((s.len_ + 1) * sizeof (ACE_USHORT16));
- // null terminate
- this->rep_[s.len_] = 0;
}
this->len_ = s.len_;
ACE_OS::memcpy ((void *) this->rep_, (const void *) s.rep_,
this->len_ * sizeof (ACE_USHORT16));
+ // null terminate
+ this->rep_[s.len_] = 0;
}
}
@@ -734,10 +734,10 @@ ACE_WString::operator += (const ACE_WString &s)
{
ACE_TRACE ("ACE_WString::operator +=");
ACE_USHORT16 *t = (ACE_USHORT16 *) this->allocator_->malloc ((this->len_ + s.len_ + 1) * sizeof (ACE_USHORT16));
-
+
ACE_OS::memcpy ((void *) t, (const void *) this->rep_, this->len_ * sizeof (ACE_USHORT16));
- ACE_OS::memcpy ((void *) (t + this->len_ * sizeof (ACE_USHORT16)),
- (const void *) s.rep_, s.len_ * sizeof (ACE_USHORT16));
+ ACE_OS::memcpy ((void *) (t + this->len_),
+ (const void *) s.rep_, s.len_ * sizeof (ACE_USHORT16));
this->len_ += s.len_;
// null terminate