summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/JS_GlobalData.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-02 14:37:54 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-02 14:37:55 -0700
commit4cf551577856f89103e162edc761def44ffb96fc (patch)
tree452684db6c2dd2b9aa697415ff4b752e59123b77 /fpdfsdk/javascript/JS_GlobalData.cpp
parent66bd67023f747c489d7144aaf4ca6222c686cd26 (diff)
downloadpdfium-4cf551577856f89103e162edc761def44ffb96fc.tar.xz
Remove FX_BOOL from fpdfsdk.
Review-Url: https://codereview.chromium.org/2453683011
Diffstat (limited to 'fpdfsdk/javascript/JS_GlobalData.cpp')
-rw-r--r--fpdfsdk/javascript/JS_GlobalData.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/fpdfsdk/javascript/JS_GlobalData.cpp b/fpdfsdk/javascript/JS_GlobalData.cpp
index 4e3782ec20..580cb466e6 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;