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

Unified Diff: fpdfsdk/src/javascript/JS_Value.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_Runtime.cpp ('k') | fpdfsdk/src/javascript/PublicMethods.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/JS_Value.cpp
diff --git a/fpdfsdk/src/javascript/JS_Value.cpp b/fpdfsdk/src/javascript/JS_Value.cpp
index 058f2eaf4526f938337ba54ad9a69a905ee87649..611b1112a06f213c26cd8e4e9400062a478edf68 100644
--- a/fpdfsdk/src/javascript/JS_Value.cpp
+++ b/fpdfsdk/src/javascript/JS_Value.cpp
@@ -256,45 +256,45 @@ FXJSVALUETYPE CJS_Value::GetType() const
return VT_unknown;
}
-FX_BOOL CJS_Value::IsArrayObject() const
+bool CJS_Value::IsArrayObject() const
{
- if(m_pValue.IsEmpty()) return FALSE;
+ if(m_pValue.IsEmpty()) return false;
return m_pValue->IsArray();
}
-FX_BOOL CJS_Value::IsDateObject() const
+bool CJS_Value::IsDateObject() const
{
- if(m_pValue.IsEmpty()) return FALSE;
+ if(m_pValue.IsEmpty()) return false;
return m_pValue->IsDate();
}
//CJS_Value::operator CJS_Array()
-FX_BOOL CJS_Value::ConvertToArray(CJS_Array &array) const
+bool CJS_Value::ConvertToArray(CJS_Array &array) const
{
if (IsArrayObject())
{
array.Attach(JS_ToArray(m_isolate, m_pValue));
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-FX_BOOL CJS_Value::ConvertToDate(CJS_Date &date) const
+bool CJS_Value::ConvertToDate(CJS_Date &date) const
{
// if (GetType() == VT_date)
// {
// date = (double)(*this);
-// return TRUE;
+// return true;
// }
if (IsDateObject())
{
date.Attach(m_pValue);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/* ---------------------------- CJS_PropValue ---------------------------- */
@@ -314,12 +314,12 @@ CJS_PropValue::~CJS_PropValue()
{
}
-FX_BOOL CJS_PropValue::IsSetting()
+bool CJS_PropValue::IsSetting()
{
return m_bIsSetting;
}
-FX_BOOL CJS_PropValue::IsGetting()
+bool CJS_PropValue::IsGetting()
{
return !m_bIsSetting;
}
@@ -480,9 +480,9 @@ void CJS_Array::Attach(v8::Local<v8::Array> pArray)
m_pArray = pArray;
}
-FX_BOOL CJS_Array::IsAttached()
+bool CJS_Array::IsAttached()
{
- return FALSE;
+ return false;
}
void CJS_Array::GetElement(unsigned index,CJS_Value &value)
@@ -543,9 +543,9 @@ CJS_Date::~CJS_Date()
{
}
-FX_BOOL CJS_Date::IsValidDate()
+bool CJS_Date::IsValidDate()
{
- if(m_pDate.IsEmpty()) return FALSE;
+ if(m_pDate.IsEmpty()) return false;
return !JS_PortIsNan(JS_ToNumber(m_isolate, m_pDate));
}
« no previous file with comments | « fpdfsdk/src/javascript/JS_Runtime.cpp ('k') | fpdfsdk/src/javascript/PublicMethods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698