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

Unified Diff: core/src/fpdfdoc/doc_metadata.cpp

Issue 1239313005: Merge to XFA - else after returns. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Fix issues. Created 5 years, 5 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 | « core/src/fpdfdoc/doc_formfield.cpp ('k') | core/src/fpdfdoc/doc_ocg.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfdoc/doc_metadata.cpp
diff --git a/core/src/fpdfdoc/doc_metadata.cpp b/core/src/fpdfdoc/doc_metadata.cpp
index a4c77debd3bc068da267e3561d2fe48d710063ee..7624e0a2f0f3cc5f2cff1c5d262fb86e40a0c0ab 100644
--- a/core/src/fpdfdoc/doc_metadata.cpp
+++ b/core/src/fpdfdoc/doc_metadata.cpp
@@ -113,7 +113,8 @@ int32_t CPDF_Metadata::GetString(const CFX_ByteStringC& bsItem, CFX_WideString &
}
wsStr = pElmnt->GetContent(0);
return wsStr.GetLength();
- } else if (bsItem == FX_BSTRC("Author")) {
+ }
+ if (bsItem == FX_BSTRC("Author")) {
CXML_Element *pElmnt = pTag->GetElement(NULL, bsTag);
if (!pElmnt) {
continue;
@@ -128,14 +129,13 @@ int32_t CPDF_Metadata::GetString(const CFX_ByteStringC& bsItem, CFX_WideString &
}
wsStr = pElmnt->GetContent(0);
return wsStr.GetLength();
- } else {
- CXML_Element *pElmnt = pTag->GetElement(NULL, bsTag);
- if (!pElmnt) {
- continue;
- }
- wsStr = pElmnt->GetContent(0);
- return wsStr.GetLength();
}
+ CXML_Element *pElmnt = pTag->GetElement(NULL, bsTag);
+ if (!pElmnt) {
+ continue;
+ }
+ wsStr = pElmnt->GetContent(0);
+ return wsStr.GetLength();
}
return -1;
}
« no previous file with comments | « core/src/fpdfdoc/doc_formfield.cpp ('k') | core/src/fpdfdoc/doc_ocg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698