Author: faridz Date: Mon Mar 17 07:25:28 2008 New Revision: 637898 URL: http://svn.apache.org/viewvc?rev=637898&view=rev Log: 2008-03-17 Farid Zaripov <[EMAIL PROTECTED]>
Merged r637897 from trunk. * include/string.cc (__replace_aux): Partially reverted changes for STDCXX-170 (r629550). * tests/regress/21.string.replace.stdcxx-170.cpp: Deleted regression test since STDCXX-170 issue deferred to 4.3 release. Removed: stdcxx/branches/4.2.x/tests/regress/21.string.replace.stdcxx-170.cpp Modified: stdcxx/branches/4.2.x/include/string.cc Modified: stdcxx/branches/4.2.x/include/string.cc URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/string.cc?rev=637898&r1=637897&r2=637898&view=diff ============================================================================== --- stdcxx/branches/4.2.x/include/string.cc (original) +++ stdcxx/branches/4.2.x/include/string.cc Mon Mar 17 07:25:28 2008 @@ -648,35 +648,14 @@ } else { // Current reference has enough room. - pointer __tmp = 0; - - if (__n2) { - const const_pointer __ptr = - &_RWSTD_REINTERPRET_CAST (const_reference, *__first2); - - if (__s.data () <= __ptr && __s.data () + __ssize > __ptr) { - const _RWSTD_SIZE_T __tmp_size = __n2 * sizeof (value_type); - __tmp = _RWSTD_STATIC_CAST (pointer, - ::operator new (__tmp_size)); - for (__d = 0; __d < __n2; __d++) - traits_type::assign (*(__tmp + __d), *__first2++); - } - } - if (__rem) traits_type::move (__s._C_data + __pos + __n2, __s._C_data + __pos + __n, __rem); - if (__tmp) { - traits_type::copy (__s._C_data + __pos, __tmp, __n2); - ::operator delete (__tmp); - } - else { - for (__d = 0; __d < __n2; __d++) - traits_type::assign (*(__s._C_data + __pos + __d), - *__first2++); - } + for (__d = 0; __d < __n2; __d++) + traits_type::assign (*(__s._C_data + __pos + __d), + *__first2++); __s._C_pref ()->_C_size._C_size = __len; traits_type::assign (__s._C_data [__len], value_type ());