diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-07-23 13:36:00 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-07-23 13:36:00 -0700 |
commit | f1e7c461dfabbff6b65a072f24f6711b34159361 (patch) | |
tree | 3b0bb772a59669f06b86824a444fd06642592d4b /fpdfsdk/src/javascript/JS_GlobalData.cpp | |
parent | 320b2313d19869333ed453af546e61a9fc2b81c9 (diff) | |
download | pdfium-f1e7c461dfabbff6b65a072f24f6711b34159361.tar.xz |
Revert "FX_BOOL considered harmful, part 2."
This reverts commit 320b2313d19869333ed453af546e61a9fc2b81c9.
Reason for revert: build failure.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1255693002 .
Diffstat (limited to 'fpdfsdk/src/javascript/JS_GlobalData.cpp')
-rw-r--r-- | fpdfsdk/src/javascript/JS_GlobalData.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/fpdfsdk/src/javascript/JS_GlobalData.cpp b/fpdfsdk/src/javascript/JS_GlobalData.cpp index 71e3a50a60..8c7bd7150e 100644 --- a/fpdfsdk/src/javascript/JS_GlobalData.cpp +++ b/fpdfsdk/src/javascript/JS_GlobalData.cpp @@ -296,7 +296,7 @@ void CJS_GlobalData::SetGlobalVariableNull(const FX_CHAR* propname) } } -bool CJS_GlobalData::SetGlobalVariablePersistent(const FX_CHAR* propname, bool bPersistent) +FX_BOOL CJS_GlobalData::SetGlobalVariablePersistent(const FX_CHAR* propname, FX_BOOL bPersistent) { ASSERT(propname != NULL); CFX_ByteString sPropName = propname; @@ -304,18 +304,18 @@ bool CJS_GlobalData::SetGlobalVariablePersistent(const FX_CHAR* propname, bool b sPropName.TrimLeft(); sPropName.TrimRight(); - if (sPropName.GetLength() == 0) return false; + if (sPropName.GetLength() == 0) return FALSE; if (CJS_GlobalData_Element* pData = GetGlobalVariable(sPropName)) { pData->bPersistent = bPersistent; - return true; + return TRUE; } - return false; + return FALSE; } -bool CJS_GlobalData::DeleteGlobalVariable(const FX_CHAR* propname) +FX_BOOL CJS_GlobalData::DeleteGlobalVariable(const FX_CHAR* propname) { ASSERT(propname != NULL); CFX_ByteString sPropName = propname; @@ -323,7 +323,7 @@ bool CJS_GlobalData::DeleteGlobalVariable(const FX_CHAR* propname) sPropName.TrimLeft(); sPropName.TrimRight(); - if (sPropName.GetLength() == 0) return false; + if (sPropName.GetLength() == 0) return FALSE; int nFind = FindGlobalVariable(sPropName); @@ -331,10 +331,10 @@ bool CJS_GlobalData::DeleteGlobalVariable(const FX_CHAR* propname) { delete m_arrayGlobalData.GetAt(nFind); m_arrayGlobalData.RemoveAt(nFind); - return true; + return TRUE; } - return false; + return FALSE; } int32_t CJS_GlobalData::GetSize() const @@ -417,7 +417,7 @@ void CJS_GlobalData::LoadGlobalPersistentVariables() break; } SetGlobalVariableNumber(sEntry, dData); - SetGlobalVariablePersistent(sEntry, true); + SetGlobalVariablePersistent(sEntry, TRUE); } break; case JS_GLOBALDATA_TYPE_BOOLEAN: @@ -425,7 +425,7 @@ void CJS_GlobalData::LoadGlobalPersistentVariables() FX_WORD wData = *((FX_WORD*)p); p += sizeof(FX_WORD); SetGlobalVariableBoolean(sEntry, (bool)(wData == 1)); - SetGlobalVariablePersistent(sEntry, true); + SetGlobalVariablePersistent(sEntry, TRUE); } break; case JS_GLOBALDATA_TYPE_STRING: @@ -437,14 +437,14 @@ void CJS_GlobalData::LoadGlobalPersistentVariables() break; SetGlobalVariableString(sEntry, CFX_ByteString(p, dwLength)); - SetGlobalVariablePersistent(sEntry, true); + SetGlobalVariablePersistent(sEntry, TRUE); p += sizeof(char) * dwLength; } break; case JS_GLOBALDATA_TYPE_NULL: { SetGlobalVariableNull(sEntry); - SetGlobalVariablePersistent(sEntry, true); + SetGlobalVariablePersistent(sEntry, TRUE); } } } |