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

Side by Side Diff: xfa/fgas/crt/fgas_codepage.cpp

Issue 1885973002: Remove implicit cast from CFX_ByteString to (const char*). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Typo Created 4 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 unified diff | Download patch
« no previous file with comments | « fpdfsdk/pdfwindow/PWL_FontMap.cpp ('k') | xfa/fgas/crt/fgas_stream.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/fxcrt/include/fx_ext.h" 7 #include "core/fxcrt/include/fx_ext.h"
8 #include "xfa/fgas/crt/fgas_codepage.h" 8 #include "xfa/fgas/crt/fgas_codepage.h"
9 #include "xfa/fgas/crt/fgas_language.h" 9 #include "xfa/fgas/crt/fgas_language.h"
10 10
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 } 332 }
333 if (iLength == 0) { 333 if (iLength == 0) {
334 return 0xFFFF; 334 return 0xFFFF;
335 } 335 }
336 CFX_ByteString csStr; 336 CFX_ByteString csStr;
337 FX_CHAR* pBuf = csStr.GetBuffer(iLength + 1); 337 FX_CHAR* pBuf = csStr.GetBuffer(iLength + 1);
338 for (int32_t i = 0; i < iLength; ++i) { 338 for (int32_t i = 0; i < iLength; ++i) {
339 *pBuf++ = (FX_CHAR)*pStr++; 339 *pBuf++ = (FX_CHAR)*pStr++;
340 } 340 }
341 csStr.ReleaseBuffer(iLength); 341 csStr.ReleaseBuffer(iLength);
342 return FX_GetCodePageFromStringA(csStr, iLength); 342 return FX_GetCodePageFromStringA(csStr.c_str(), iLength);
343 } 343 }
OLDNEW
« no previous file with comments | « fpdfsdk/pdfwindow/PWL_FontMap.cpp ('k') | xfa/fgas/crt/fgas_stream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698