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