diff options
Diffstat (limited to 'core/fxcrt')
-rw-r--r-- | core/fxcrt/cfx_string_c_template.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/fxcrt/cfx_string_c_template.h b/core/fxcrt/cfx_string_c_template.h index 89d0727b0f..5dfff69a95 100644 --- a/core/fxcrt/cfx_string_c_template.h +++ b/core/fxcrt/cfx_string_c_template.h @@ -167,6 +167,13 @@ class CFX_StringCTemplate { return result < 0 || (result == 0 && m_Length < that.m_Length); } + 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()), + std::min(m_Length, that.m_Length)); + return result > 0 || (result == 0 && m_Length > that.m_Length); + } + protected: CFX_UnownedPtr<const UnsignedType> m_Ptr; FX_STRSIZE m_Length; |