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

Side by Side Diff: core/src/fxcrt/fx_extension.cpp

Issue 811593007: XFA: merge patch from CL 733693003, getting rid of more casts (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 12 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 | « core/src/fxcrt/fx_basic_buffer.cpp ('k') | core/src/fxcrt/fx_xml_parser.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 "../../include/fxcrt/fx_ext.h" 7 #include "../../include/fxcrt/fx_ext.h"
8 #include "extension.h" 8 #include "extension.h"
9 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 9 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
10 #include <wincrypt.h> 10 #include <wincrypt.h>
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 { 151 {
152 return FXSYS_log(x) / FXSYS_log(b); 152 return FXSYS_log(x) / FXSYS_log(b);
153 } 153 }
154 FX_FLOAT FXSYS_strtof(FX_LPCSTR pcsStr, FX_INT32 iLength, FX_INT32 *pUsedLen) 154 FX_FLOAT FXSYS_strtof(FX_LPCSTR pcsStr, FX_INT32 iLength, FX_INT32 *pUsedLen)
155 { 155 {
156 FXSYS_assert(pcsStr != NULL); 156 FXSYS_assert(pcsStr != NULL);
157 if (iLength < 0) { 157 if (iLength < 0) {
158 iLength = (FX_INT32)FXSYS_strlen(pcsStr); 158 iLength = (FX_INT32)FXSYS_strlen(pcsStr);
159 } 159 }
160 CFX_WideString ws = CFX_WideString::FromLocal(pcsStr, iLength); 160 CFX_WideString ws = CFX_WideString::FromLocal(pcsStr, iLength);
161 return FXSYS_wcstof((FX_LPCWSTR)ws, iLength, pUsedLen); 161 return FXSYS_wcstof(ws.c_str(), iLength, pUsedLen);
162 } 162 }
163 FX_FLOAT FXSYS_wcstof(FX_LPCWSTR pwsStr, FX_INT32 iLength, FX_INT32 *pUsedLen) 163 FX_FLOAT FXSYS_wcstof(FX_LPCWSTR pwsStr, FX_INT32 iLength, FX_INT32 *pUsedLen)
164 { 164 {
165 FXSYS_assert(pwsStr != NULL); 165 FXSYS_assert(pwsStr != NULL);
166 if (iLength < 0) { 166 if (iLength < 0) {
167 iLength = (FX_INT32)FXSYS_wcslen(pwsStr); 167 iLength = (FX_INT32)FXSYS_wcslen(pwsStr);
168 } 168 }
169 if (iLength == 0) { 169 if (iLength == 0) {
170 return 0.0f; 170 return 0.0f;
171 } 171 }
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 *pBuf ++ = gs_FX_pHexChars[b & 0x0F]; 425 *pBuf ++ = gs_FX_pHexChars[b & 0x0F];
426 if (bSeparator && (i == 3 || i == 5 || i == 7 || i == 9)) { 426 if (bSeparator && (i == 3 || i == 5 || i == 7 || i == 9)) {
427 *pBuf ++ = L'-'; 427 *pBuf ++ = L'-';
428 } 428 }
429 } 429 }
430 bsStr.ReleaseBuffer(bSeparator ? 36 : 32); 430 bsStr.ReleaseBuffer(bSeparator ? 36 : 32);
431 } 431 }
432 #ifdef __cplusplus 432 #ifdef __cplusplus
433 } 433 }
434 #endif 434 #endif
OLDNEW
« no previous file with comments | « core/src/fxcrt/fx_basic_buffer.cpp ('k') | core/src/fxcrt/fx_xml_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698