diff options
author | seibelr <seibelr@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-11-24 22:12:20 +0000 |
---|---|---|
committer | seibelr <seibelr@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-11-24 22:12:20 +0000 |
commit | 47b676670dc9373bc77af80388e0b51e36134738 (patch) | |
tree | aacce0809279e1d142e7b196a84ff10dfbdae4d0 /ACE/ace/String_Base.cpp | |
parent | 3dd4e2fe6c64de3a9db04757eade78d764b578f1 (diff) | |
download | ATCD-GH5_0port.tar.gz |
Added the ACE and TAO for this branchGH5_0port
Diffstat (limited to 'ACE/ace/String_Base.cpp')
-rw-r--r-- | ACE/ace/String_Base.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/ACE/ace/String_Base.cpp b/ACE/ace/String_Base.cpp index 525dcbc2553..01de0963b72 100644 --- a/ACE/ace/String_Base.cpp +++ b/ACE/ace/String_Base.cpp @@ -267,29 +267,19 @@ ACE_String_Base<CHAR>::resize (typename ACE_String_Base<CHAR>::size_type len, { ACE_TRACE ("ACE_String_Base<CHAR>::resize"); - fast_resize(len); - ACE_OS::memset (this->rep_, c, this->buf_len_ * sizeof (CHAR)); -} - -template <class CHAR> void -ACE_String_Base<CHAR>::fast_resize (size_t len) -{ - ACE_TRACE ("ACE_String_Base<CHAR>::fast_resize"); - // Only reallocate if we don't have enough space... if (this->buf_len_ <= len) { - if (this->buf_len_ != 0 && this->release_ != 0) + if (this->buf_len_ != 0 && this->release_ != 0) this->allocator_->free (this->rep_); - this->rep_ = static_cast<CHAR*> - (this->allocator_->malloc ((len + 1) * sizeof (CHAR))); + this->rep_ = static_cast<CHAR*>( + this->allocator_->malloc ((len + 1) * sizeof (CHAR))); this->buf_len_ = len + 1; this->release_ = 1; } this->len_ = 0; - if (len > 0) - this->rep_[0] = 0; + ACE_OS::memset (this->rep_, c, this->buf_len_ * sizeof (CHAR)); } template <class CHAR> void |