Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge "Use memmove instead of memcpy in string::assign."

  • Loading branch information...
commit b6fd8889b029faa2bd8a14c11b38aa07755e1ef0 2 parents a4b9a71 + 236ba45
@kruton kruton authored Android (Google) Code Review committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 stlport/stl/_string.c
View
4 stlport/stl/_string.c
@@ -242,11 +242,11 @@ basic_string<_CharT,_Traits,_Alloc>&
basic_string<_CharT,_Traits,_Alloc>::_M_assign(const _CharT* __f, const _CharT* __l) {
ptrdiff_t __n = __l - __f;
if (__STATIC_CAST(size_type, __n) <= size()) {
- _Traits::copy(this->_M_Start(), __f, __n);
+ _Traits::move(this->_M_Start(), __f, __n);
erase(begin() + __n, end());
}
else {
- _Traits::copy(this->_M_Start(), __f, size());
+ _Traits::move(this->_M_Start(), __f, size());
_M_append(__f + size(), __l);
}
return *this;
Please sign in to comment.
Something went wrong with that request. Please try again.