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

Unified Diff: fpdfsdk/src/javascript/JS_GlobalData.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/JS_GlobalData.cpp
diff --git a/fpdfsdk/src/javascript/JS_GlobalData.cpp b/fpdfsdk/src/javascript/JS_GlobalData.cpp
index 2ba5c3bca5a69d48533bbc182732f18fd9389fdd..3ee6369ac9a220bbcddf896fc874458b01ef59c0 100644
--- a/fpdfsdk/src/javascript/JS_GlobalData.cpp
+++ b/fpdfsdk/src/javascript/JS_GlobalData.cpp
@@ -163,22 +163,21 @@ CJS_GlobalData_Element* CJS_GlobalData::GetGlobalVariable(const FX_CHAR* propnam
ASSERT(propname != NULL);
int nFind = FindGlobalVariable(propname);
-
if (nFind >= 0)
return m_arrayGlobalData.GetAt(nFind);
- else
- return NULL;
+
+ return NULL;
}
void CJS_GlobalData::SetGlobalVariableNumber(const FX_CHAR* propname, double dData)
{
ASSERT(propname != NULL);
- CFX_ByteString sPropName = propname;
+ CFX_ByteString sPropName = propname;
sPropName.TrimLeft();
sPropName.TrimRight();
-
- if (sPropName.GetLength() == 0) return;
+ if (sPropName.GetLength() == 0)
+ return;
if (CJS_GlobalData_Element* pData = GetGlobalVariable(sPropName))
{
@@ -191,7 +190,6 @@ void CJS_GlobalData::SetGlobalVariableNumber(const FX_CHAR* propname, double dDa
pNewData->data.sKey = sPropName;
pNewData->data.nType = JS_GLOBALDATA_TYPE_NUMBER;
pNewData->data.dData = dData;
-
m_arrayGlobalData.Add(pNewData);
}
}

Powered by Google App Engine
This is Rietveld 408576698