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

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

Issue 1243883003: Fix else-after-returns throughout pdfium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, Address comments. 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 211bc25329a8c9c4287bcf5daa6d81f4d70b0dc6..aeeb1d1f6089e408ff88d50f59814664cf26915f 100644
--- a/core/src/fpdfdoc/doc_metadata.cpp
+++ b/core/src/fpdfdoc/doc_metadata.cpp
@@ -112,7 +112,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;
@@ -127,14 +128,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