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

Side by Side Diff: core/fpdfapi/fpdf_font/cpdf_font.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 | « no previous file | core/fpdfapi/fpdf_font/cpdf_type3font.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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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/fpdfapi/fpdf_font/include/cpdf_font.h" 7 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
8 8
9 #include "core/fpdfapi/fpdf_font/cpdf_truetypefont.h" 9 #include "core/fpdfapi/fpdf_font/cpdf_truetypefont.h"
10 #include "core/fpdfapi/fpdf_font/cpdf_type1font.h" 10 #include "core/fpdfapi/fpdf_font/cpdf_type1font.h"
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 478
479 const FX_CHAR* CPDF_Font::GetAdobeCharName(int iBaseEncoding, 479 const FX_CHAR* CPDF_Font::GetAdobeCharName(int iBaseEncoding,
480 const CFX_ByteString* pCharNames, 480 const CFX_ByteString* pCharNames,
481 int charcode) { 481 int charcode) {
482 ASSERT(charcode >= 0 && charcode < 256); 482 ASSERT(charcode >= 0 && charcode < 256);
483 if (charcode < 0 || charcode >= 256) 483 if (charcode < 0 || charcode >= 256)
484 return nullptr; 484 return nullptr;
485 485
486 const FX_CHAR* name = nullptr; 486 const FX_CHAR* name = nullptr;
487 if (pCharNames) 487 if (pCharNames)
488 name = pCharNames[charcode]; 488 name = pCharNames[charcode].c_str();
489 if ((!name || name[0] == 0) && iBaseEncoding) 489 if ((!name || name[0] == 0) && iBaseEncoding)
490 name = PDF_CharNameFromPredefinedCharSet(iBaseEncoding, charcode); 490 name = PDF_CharNameFromPredefinedCharSet(iBaseEncoding, charcode);
491 return name && name[0] ? name : nullptr; 491 return name && name[0] ? name : nullptr;
492 } 492 }
OLDNEW
« no previous file with comments | « no previous file | core/fpdfapi/fpdf_font/cpdf_type3font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698