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

Unified Diff: fpdfsdk/src/javascript/JS_GlobalData.cpp

Issue 1252613002: FX_BOOL considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual edits. 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
« no previous file with comments | « fpdfsdk/src/javascript/JS_EventHandler.cpp ('k') | fpdfsdk/src/javascript/JS_Runtime.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..38efb5320032faad76daaf2c133a7943a40b5743 100644
--- a/fpdfsdk/src/javascript/JS_GlobalData.cpp
+++ b/fpdfsdk/src/javascript/JS_GlobalData.cpp
@@ -298,7 +298,7 @@ void CJS_GlobalData::SetGlobalVariableNull(const FX_CHAR* propname)
}
}
-FX_BOOL CJS_GlobalData::SetGlobalVariablePersistent(const FX_CHAR* propname, FX_BOOL bPersistent)
+bool CJS_GlobalData::SetGlobalVariablePersistent(const FX_CHAR* propname, bool bPersistent)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -306,18 +306,18 @@ FX_BOOL CJS_GlobalData::SetGlobalVariablePersistent(const FX_CHAR* propname, FX_
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;
}
-FX_BOOL CJS_GlobalData::DeleteGlobalVariable(const FX_CHAR* propname)
+bool CJS_GlobalData::DeleteGlobalVariable(const FX_CHAR* propname)
{
ASSERT(propname != NULL);
CFX_ByteString sPropName = propname;
@@ -325,7 +325,7 @@ FX_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);
@@ -333,10 +333,10 @@ FX_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
@@ -419,7 +419,7 @@ void CJS_GlobalData::LoadGlobalPersistentVariables()
break;
}
SetGlobalVariableNumber(sEntry, dData);
- SetGlobalVariablePersistent(sEntry, TRUE);
+ SetGlobalVariablePersistent(sEntry, true);
}
break;
case JS_GLOBALDATA_TYPE_BOOLEAN:
@@ -427,7 +427,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:
@@ -439,14 +439,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);
}
}
}
« no previous file with comments | « fpdfsdk/src/javascript/JS_EventHandler.cpp ('k') | fpdfsdk/src/javascript/JS_Runtime.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698