X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3d593f49a4eea937c00884b2134e93336d9843d1..6bd4f2812dca25f2c693ba27e5c117deee71fb3e:/src/common/unichar.cpp diff --git a/src/common/unichar.cpp b/src/common/unichar.cpp index d75555acd9..7a8df7600d 100644 --- a/src/common/unichar.cpp +++ b/src/common/unichar.cpp @@ -106,8 +106,7 @@ wxUniCharRef& wxUniCharRef::operator=(const wxUniChar& c) // code -- in that case, we have to use wxStringImpl::replace() and // this invalidates all iterators, so we have to update them too: - wxString& str = *wx_const_cast(wxString*, m_node.m_str); - wxStringImpl& strimpl = str.m_impl; + wxStringImpl& strimpl = m_str.m_impl; int iterDiff = lenNew - lenOld; size_t posIdx = m_pos - strimpl.begin(); @@ -121,7 +120,7 @@ wxUniCharRef& wxUniCharRef::operator=(const wxUniChar& c) size_t *indexes = indexes_a; size_t iterNum = 0; wxStringIteratorNode *it; - for ( it = str.m_iterators.ptr; it; it = it->m_next, ++iterNum ) + for ( it = m_str.m_iterators.ptr; it; it = it->m_next, ++iterNum ) { wxASSERT( it->m_iter || it->m_citer ); @@ -152,7 +151,7 @@ wxUniCharRef& wxUniCharRef::operator=(const wxUniChar& c) // finally, set the iterators to valid values again (note that this // updates m_pos as well): size_t i; - for ( i = 0, it = str.m_iterators.ptr; it; it = it->m_next, ++i ) + for ( i = 0, it = m_str.m_iterators.ptr; it; it = it->m_next, ++i ) { wxASSERT( i < iterNum ); wxASSERT( it->m_iter || it->m_citer );