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

Unified Diff: fpdfsdk/src/javascript/PublicMethods.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/javascript/PublicMethods.cpp
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp
index a615d4409b592be5c690b19a9780f8c98b498b0e..a165000d001583a1df72caf7e7c5646874d0e869 100644
--- a/fpdfsdk/src/javascript/PublicMethods.cpp
+++ b/fpdfsdk/src/javascript/PublicMethods.cpp
@@ -97,7 +97,8 @@ FX_BOOL CJS_PublicMethods::IsNumber(const FX_WCHAR* string)
}
else if (c == 'e' || c == 'E')
{
- if (bKXJS) return FALSE;
+ if (bKXJS)
+ return FALSE;
p++;
c = *p;
@@ -168,19 +169,18 @@ double CJS_PublicMethods::AF_Simple(const FX_WCHAR* sFuction, double dValue1, do
{
return dValue1 + dValue2;
}
- else if (FXSYS_wcsicmp(sFuction, L"PRD") == 0)
+ if (FXSYS_wcsicmp(sFuction, L"PRD") == 0)
{
return dValue1 * dValue2;
}
- else if (FXSYS_wcsicmp(sFuction,L"MIN") == 0)
+ if (FXSYS_wcsicmp(sFuction,L"MIN") == 0)
{
return FX_MIN(dValue1, dValue2);
}
- else if (FXSYS_wcsicmp(sFuction,L"MAX") == 0)
+ if (FXSYS_wcsicmp(sFuction,L"MAX") == 0)
{
return FX_MAX(dValue1, dValue2);
}
-
return dValue1;
}
@@ -1308,11 +1308,8 @@ FX_BOOL CJS_PublicMethods::AFNumber_Keystroke(IFXJS_Context* cc, const CJS_Param
bRc = FALSE;
return TRUE;
}
- else
- {
- bHasSep = TRUE;
- continue;
- }
+ bHasSep = TRUE;
+ continue;
}
if (*it == L'-')
{
@@ -1322,13 +1319,13 @@ FX_BOOL CJS_PublicMethods::AFNumber_Keystroke(IFXJS_Context* cc, const CJS_Param
bRc = FALSE;
return TRUE;
}
- else if (it != w_strChange2.begin()) //sign's position is not correct
+ if (it != w_strChange2.begin()) //sign's position is not correct
{
FX_BOOL &bRc = pEvent->Rc();
bRc = FALSE;
return TRUE;
}
- else if (pEvent->SelStart() != 0)
+ if (pEvent->SelStart() != 0)
{
FX_BOOL &bRc = pEvent->Rc();
bRc = FALSE;

Powered by Google App Engine
This is Rietveld 408576698