Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2447)

Unified Diff: core/include/fxcrt/fx_string.h

Issue 1084293003: Add missing operators for CFX_WideString (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: L'' Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/src/fxcrt/fx_basic_wstring_unittest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fxcrt/fx_string.h
diff --git a/core/include/fxcrt/fx_string.h b/core/include/fxcrt/fx_string.h
index 4db83e3914321abf93907023acd8142e7c0c5a7e..dd8752ef2838108bf1c9085caf1544941ebdba47 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;
« no previous file with comments | « no previous file | core/src/fxcrt/fx_basic_wstring_unittest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698