diff options
Diffstat (limited to 'core/fxcrt/cfx_string_c_template.h')
-rw-r--r-- | core/fxcrt/cfx_string_c_template.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/fxcrt/cfx_string_c_template.h b/core/fxcrt/cfx_string_c_template.h index bc0fe1e0a0..99948e90a0 100644 --- a/core/fxcrt/cfx_string_c_template.h +++ b/core/fxcrt/cfx_string_c_template.h @@ -119,12 +119,12 @@ class CFX_StringCTemplate { FX_STRSIZE GetLength() const { return m_Length; } bool IsEmpty() const { return m_Length == 0; } - UnsignedType GetAt(FX_STRSIZE index) const { + const UnsignedType& operator[](const FX_STRSIZE index) const { ASSERT(index >= 0 && index < GetLength()); return m_Ptr.Get()[index]; } - CharType CharAt(FX_STRSIZE index) const { + const CharType CharAt(const FX_STRSIZE index) const { ASSERT(index >= 0 && index < GetLength()); return static_cast<CharType>(m_Ptr.Get()[index]); } @@ -164,8 +164,6 @@ class CFX_StringCTemplate { return CFX_StringCTemplate(m_Ptr.Get() + m_Length - count, count); } - UnsignedType operator[](FX_STRSIZE index) const { return GetAt(index); } - bool operator<(const CFX_StringCTemplate& that) const { int result = FXSYS_cmp(reinterpret_cast<const CharType*>(m_Ptr.Get()), reinterpret_cast<const CharType*>(that.m_Ptr.Get()), |