From ea6a069e6e593d97513e86fc761cf789a9714c22 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 22 Apr 2015 10:23:07 -0700 Subject: Add missing operators for CFX_WideString Part 4 of 4. BUG=pdfium:142 R=brucedawson@chromium.org, thestig@chromium.org Review URL: https://codereview.chromium.org/1084293003 --- core/include/fxcrt/fx_string.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/include/fxcrt') diff --git a/core/include/fxcrt/fx_string.h b/core/include/fxcrt/fx_string.h index 4db83e3914..dd8752ef28 100644 --- a/core/include/fxcrt/fx_string.h +++ b/core/include/fxcrt/fx_string.h @@ -654,6 +654,11 @@ public: const CFX_WideString& operator += (const CFX_WideStringC& str); + bool operator< (const CFX_WideString& str) const { + int result = wmemcmp(c_str(), str.c_str(), std::min(GetLength(), str.GetLength())); + return result < 0 || (result == 0 && GetLength() < str.GetLength()); + } + FX_WCHAR GetAt(FX_STRSIZE nIndex) const { return m_pData ? m_pData->m_String[nIndex] : 0; -- cgit v1.2.3