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

Unified Diff: fpdfsdk/fpdfppo.cpp

Issue 1977093002: Make CFX_ByteString(const CFX_ByteStringC&) explicit. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, nit Created 4 years, 7 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 | « fpdfsdk/fpdf_transformpage.cpp ('k') | fpdfsdk/fxedit/fxet_ap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfppo.cpp
diff --git a/fpdfsdk/fpdfppo.cpp b/fpdfsdk/fpdfppo.cpp
index 1ec968ddf4b1c6591c1fcbcc33ae4e60b34486b7..97fd390cb3ccbb28f628e95660752795e4f48c6c 100644
--- a/fpdfsdk/fpdfppo.cpp
+++ b/fpdfsdk/fpdfppo.cpp
@@ -32,7 +32,7 @@ class CPDF_PageOrganizer {
CPDF_Document* pDestPDFDoc,
int nIndex);
CPDF_Object* PageDictGetInheritableTag(CPDF_Dictionary* pDict,
- CFX_ByteString nSrctag);
+ const CFX_ByteString& bsSrctag);
FX_BOOL UpdateReference(CPDF_Object* pObj,
CPDF_Document* pDoc,
ObjectNumberMap* pObjNumberMap);
@@ -175,8 +175,8 @@ FX_BOOL CPDF_PageOrganizer::ExportPage(CPDF_Document* pSrcPDFDoc,
CPDF_Object* CPDF_PageOrganizer::PageDictGetInheritableTag(
CPDF_Dictionary* pDict,
- CFX_ByteString nSrctag) {
- if (!pDict || nSrctag.IsEmpty())
+ const CFX_ByteString& bsSrcTag) {
+ if (!pDict || bsSrcTag.IsEmpty())
return nullptr;
if (!pDict->KeyExist("Parent") || !pDict->KeyExist("Type"))
return nullptr;
@@ -191,13 +191,12 @@ CPDF_Object* CPDF_PageOrganizer::PageDictGetInheritableTag(
if (!pp)
return nullptr;
- CFX_ByteStringC sSrcTag = nSrctag.AsStringC();
- if (pDict->KeyExist(sSrcTag))
- return pDict->GetObjectBy(sSrcTag);
+ if (pDict->KeyExist(bsSrcTag))
+ return pDict->GetObjectBy(bsSrcTag);
while (pp) {
- if (pp->KeyExist(sSrcTag))
- return pp->GetObjectBy(sSrcTag);
+ if (pp->KeyExist(bsSrcTag))
+ return pp->GetObjectBy(bsSrcTag);
if (!pp->KeyExist("Parent"))
break;
pp = ToDictionary(pp->GetObjectBy("Parent")->GetDirect());
« no previous file with comments | « fpdfsdk/fpdf_transformpage.cpp ('k') | fpdfsdk/fxedit/fxet_ap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698