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

Unified Diff: fpdfsdk/javascript/JS_GlobalData.cpp

Issue 2453683011: Remove FX_BOOL from fpdfsdk. (Closed)
Patch Set: Regenerate patch after rebase. Created 4 years, 1 month 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 | « fpdfsdk/javascript/JS_GlobalData.h ('k') | fpdfsdk/javascript/JS_Runtime_Stub.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/JS_GlobalData.cpp
diff --git a/fpdfsdk/javascript/JS_GlobalData.cpp b/fpdfsdk/javascript/JS_GlobalData.cpp
index 4e3782ec2037c5f5f4ae56bc3047f453740502ec..580cb466e6fa608eec7304eb3df5732ffd050aec 100644
--- a/fpdfsdk/javascript/JS_GlobalData.cpp
+++ b/fpdfsdk/javascript/JS_GlobalData.cpp
@@ -179,32 +179,31 @@ void CJS_GlobalData::SetGlobalVariableNull(const CFX_ByteString& propname) {
m_arrayGlobalData.push_back(std::move(pNewData));
}
-FX_BOOL CJS_GlobalData::SetGlobalVariablePersistent(
- const CFX_ByteString& propname,
- FX_BOOL bPersistent) {
+bool CJS_GlobalData::SetGlobalVariablePersistent(const CFX_ByteString& propname,
+ bool bPersistent) {
CFX_ByteString sPropName(propname);
if (!TrimPropName(&sPropName))
- return FALSE;
+ return false;
CJS_GlobalData_Element* pData = GetGlobalVariable(sPropName);
if (!pData)
- return FALSE;
+ return false;
pData->bPersistent = bPersistent;
- return TRUE;
+ return true;
}
-FX_BOOL CJS_GlobalData::DeleteGlobalVariable(const CFX_ByteString& propname) {
+bool CJS_GlobalData::DeleteGlobalVariable(const CFX_ByteString& propname) {
CFX_ByteString sPropName(propname);
if (!TrimPropName(&sPropName))
- return FALSE;
+ return false;
auto iter = FindGlobalVariable(sPropName);
if (iter == m_arrayGlobalData.end())
- return FALSE;
+ return false;
m_arrayGlobalData.erase(iter);
- return TRUE;
+ return true;
}
int32_t CJS_GlobalData::GetSize() const {
@@ -274,13 +273,13 @@ void CJS_GlobalData::LoadGlobalPersistentVariables() {
} break;
}
SetGlobalVariableNumber(sEntry, dData);
- SetGlobalVariablePersistent(sEntry, TRUE);
+ SetGlobalVariablePersistent(sEntry, true);
} break;
case JS_GlobalDataType::BOOLEAN: {
uint16_t wData = *((uint16_t*)p);
p += sizeof(uint16_t);
SetGlobalVariableBoolean(sEntry, (bool)(wData == 1));
- SetGlobalVariablePersistent(sEntry, TRUE);
+ SetGlobalVariablePersistent(sEntry, true);
} break;
case JS_GlobalDataType::STRING: {
uint32_t dwLength = *((uint32_t*)p);
@@ -290,12 +289,12 @@ void CJS_GlobalData::LoadGlobalPersistentVariables() {
break;
SetGlobalVariableString(sEntry, CFX_ByteString(p, dwLength));
- SetGlobalVariablePersistent(sEntry, TRUE);
+ SetGlobalVariablePersistent(sEntry, true);
p += sizeof(char) * dwLength;
} break;
case JS_GlobalDataType::NULLOBJ: {
SetGlobalVariableNull(sEntry);
- SetGlobalVariablePersistent(sEntry, TRUE);
+ SetGlobalVariablePersistent(sEntry, true);
}
case JS_GlobalDataType::OBJECT:
break;
« no previous file with comments | « fpdfsdk/javascript/JS_GlobalData.h ('k') | fpdfsdk/javascript/JS_Runtime_Stub.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698