summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_widestring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/cfx_widestring.cpp')
-rw-r--r--core/fxcrt/cfx_widestring.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/core/fxcrt/cfx_widestring.cpp b/core/fxcrt/cfx_widestring.cpp
index a1fa7ec096..c2e1e4877d 100644
--- a/core/fxcrt/cfx_widestring.cpp
+++ b/core/fxcrt/cfx_widestring.cpp
@@ -841,14 +841,10 @@ FX_STRSIZE CFX_WideString::Replace(const CFX_WideStringC& pOld,
return nCount;
}
-void CFX_WideString::SetAt(FX_STRSIZE nIndex, wchar_t ch) {
- if (!m_pData) {
- return;
- }
- ASSERT(nIndex >= 0);
- ASSERT(nIndex < m_pData->m_nDataLength);
+void CFX_WideString::SetAt(FX_STRSIZE index, wchar_t c) {
+ ASSERT(index >= 0 && index < GetLength());
ReallocBeforeWrite(m_pData->m_nDataLength);
- m_pData->m_String[nIndex] = ch;
+ m_pData->m_String[index] = c;
}
// static