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

Side by Side Diff: fpdfsdk/javascript/global.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/javascript/PublicMethods.cpp ('k') | fpdfsdk/pdfwindow/PWL_FontMap.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 "fpdfsdk/javascript/global.h" 7 #include "fpdfsdk/javascript/global.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 m_mapGlobal.clear(); 407 m_mapGlobal.clear();
408 } 408 }
409 409
410 FX_BOOL JSGlobalAlternate::SetGlobalVariables(const CFX_ByteString& propname, 410 FX_BOOL JSGlobalAlternate::SetGlobalVariables(const CFX_ByteString& propname,
411 int nType, 411 int nType,
412 double dData, 412 double dData,
413 bool bData, 413 bool bData,
414 const CFX_ByteString& sData, 414 const CFX_ByteString& sData,
415 v8::Local<v8::Object> pData, 415 v8::Local<v8::Object> pData,
416 bool bDefaultPersistent) { 416 bool bDefaultPersistent) {
417 if (!propname) 417 if (propname.IsEmpty())
418 return FALSE; 418 return FALSE;
419 419
420 auto it = m_mapGlobal.find(propname); 420 auto it = m_mapGlobal.find(propname);
421 if (it != m_mapGlobal.end()) { 421 if (it != m_mapGlobal.end()) {
422 JSGlobalData* pTemp = it->second; 422 JSGlobalData* pTemp = it->second;
423 if (pTemp->bDeleted || pTemp->nType != nType) { 423 if (pTemp->bDeleted || pTemp->nType != nType) {
424 pTemp->dData = 0; 424 pTemp->dData = 0;
425 pTemp->bData = 0; 425 pTemp->bData = 0;
426 pTemp->sData = ""; 426 pTemp->sData = "";
427 pTemp->nType = nType; 427 pTemp->nType = nType;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 return CJS_Value::VT_boolean; 504 return CJS_Value::VT_boolean;
505 if (nHash == JSCONST_nDateHash) 505 if (nHash == JSCONST_nDateHash)
506 return CJS_Value::VT_date; 506 return CJS_Value::VT_date;
507 if (nHash == JSCONST_nObjectHash) 507 if (nHash == JSCONST_nObjectHash)
508 return CJS_Value::VT_object; 508 return CJS_Value::VT_object;
509 if (nHash == JSCONST_nFXobjHash) 509 if (nHash == JSCONST_nFXobjHash)
510 return CJS_Value::VT_fxobject; 510 return CJS_Value::VT_fxobject;
511 511
512 return CJS_Value::VT_unknown; 512 return CJS_Value::VT_unknown;
513 } 513 }
OLDNEW
« no previous file with comments | « fpdfsdk/javascript/PublicMethods.cpp ('k') | fpdfsdk/pdfwindow/PWL_FontMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698