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

Unified Diff: core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp

Issue 1853233002: Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix CPDF_Name::GetConstString() 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp
diff --git a/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp
index 6c5339128bf89a25da300019da6b2ea6add54903..af79fd31c1ba7d7efd8bec7a09a0f7bb262db2aa 100644
--- a/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp
+++ b/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp
@@ -74,12 +74,13 @@ CFX_ByteString CPDF_PageContentGenerator::RealizeResource(
int idnum = 1;
while (1) {
name.Format("FX%c%d", szType[0], idnum);
- if (!pResList->KeyExist(name)) {
+ if (!pResList->KeyExist(name.AsByteStringC())) {
break;
}
idnum++;
}
- pResList->AddReference(name, m_pDocument, pResourceObj->GetObjNum());
+ pResList->AddReference(name.AsByteStringC(), m_pDocument,
+ pResourceObj->GetObjNum());
return name;
}
void CPDF_PageContentGenerator::ProcessImage(CFX_ByteTextBuf& buf,
« no previous file with comments | « no previous file | core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698