summaryrefslogtreecommitdiff
path: root/core/include/fxcrt
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-04-22 10:23:07 -0700
committerTom Sepez <tsepez@chromium.org>2015-04-22 10:23:07 -0700
commitea6a069e6e593d97513e86fc761cf789a9714c22 (patch)
tree2927d007e58da1f3d8e3ddf2ab62dad81440fdb4 /core/include/fxcrt
parentca19b6e6b4e81ba0fce1bc9d2e145cb39cf0537d (diff)
downloadpdfium-ea6a069e6e593d97513e86fc761cf789a9714c22.tar.xz
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
Diffstat (limited to 'core/include/fxcrt')
-rw-r--r--core/include/fxcrt/fx_string.h5
1 files changed, 5 insertions, 0 deletions
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;