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

Unified Diff: fpdfsdk/src/fsdk_baseannot.cpp

Issue 1243883003: Fix else-after-returns throughout pdfium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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
Index: fpdfsdk/src/fsdk_baseannot.cpp
diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp
index e35e537765986baa97325a0f679bf9fdbf8e68fc..f44b5d34c1cec4a631f5596b12e2b24803b06d41 100644
--- a/fpdfsdk/src/fsdk_baseannot.cpp
+++ b/fpdfsdk/src/fsdk_baseannot.cpp
@@ -751,20 +751,11 @@ void CPDFSDK_Annot::SetBorderWidth(int nWidth)
int CPDFSDK_Annot::GetBorderWidth() const
{
- CPDF_Array* pBorder = m_pAnnot->GetAnnotDict()->GetArray("Border");
-
- if (pBorder)
- {
+ if (CPDF_Array* pBorder = m_pAnnot->GetAnnotDict()->GetArray("Border")) {
return pBorder->GetInteger(2);
}
- else
- {
- CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDict("BS");
-
- if (pBSDict)
- {
- return pBSDict->GetInteger("W", 1);
- }
+ if (CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDict("BS")) {
+ return pBSDict->GetInteger("W", 1);
}
return 1;
}

Powered by Google App Engine
This is Rietveld 408576698