From 1ddf056da74de0a34631b8a719f4f02b4ec82144 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 22 Apr 2015 12:04:14 -0700 Subject: Add missing operators for CFX_ByteStringC. Removing the implicit cast operator forces a build breakage should we use ByteStringC in STL containers. Adding an operator< restores correct behaviour. Adding an operator[] avoids re-writing some code to call GetPtr() prior to array indexing. Part 1 of 4. R=thestig@chromium.org TBR=brucedawson@chromium.org BUG=pdfium:142. Review URL: https://codereview.chromium.org/1090303003 --- core/src/fxcrt/fx_basic_bstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/src/fxcrt/fx_basic_bstring.cpp') diff --git a/core/src/fxcrt/fx_basic_bstring.cpp b/core/src/fxcrt/fx_basic_bstring.cpp index ea9ca85021..cda7d1fdd7 100644 --- a/core/src/fxcrt/fx_basic_bstring.cpp +++ b/core/src/fxcrt/fx_basic_bstring.cpp @@ -276,7 +276,7 @@ bool CFX_ByteString::EqualNoCase(FX_BSTR str) const return false; } FX_LPCBYTE pThis = (FX_LPCBYTE)m_pData->m_String; - FX_LPCBYTE pThat = (FX_LPCBYTE)str; + FX_LPCBYTE pThat = str.GetPtr(); for (FX_STRSIZE i = 0; i < len; i ++) { if ((*pThis) != (*pThat)) { FX_BYTE bThis = *pThis; -- cgit v1.2.3